Hello @Mohamed jihad bayali
Specifically for a pie chart, there is no direct way of pinning to a dashboard. You can pin a metrics chart and split the total by status and pin that to a dashboard, but whether you render the results as a grid, or another available chart, you will not get pie chart.
As @JimmySalian-2011 has suggest, you can export the logs to Azure Monitor, specifically the JobLogs diagnostic setting is what you want. I've provided a log query that will render the results for you here. You can then pin this to a dashboard.
let IgnoreJobs = dynamic('["ImportAutomationModule2", "Compile-ConfigurationV3"]');
AzureDiagnostics
| where Category == "JobLogs"
| where RunbookName_s !in (IgnoreJobs)
| where ResultType in ("Completed", "Failed", "Queued", "Running", "Stopped", "Suspended")
| summarize arg_max(TimeGenerated, ResultType) by JobId_g
| summarize Count = count() by ResultType
| render piechart
Note: In this query I have an array called ignore jobs. I used this to filter out the jobs that are displayed in the logs, but not part of the Jobs list in the automation account.
Alternatively you can build the pie chart in an Azure Workbook and use that as your dashboarding tool, or pin the chart to the Azure Dashboard. Personally I prefer workbooks as I can utilise drill down capabilities and have more control over the UI, but it is your choice. Here is my dashboard with the workbook on the left and direct log query on the right.
The workbook can be found here: https://github.com/TheAlistairRoss/AzureMonitor/blob/main/Workbooks/AutomationAccount/JobStatusPieChart.json
I hope this helps provide you with the information you need. If it does, please make sure to mark the question as answered so it helps other people in future.
Kind regards
Alistair