Change bar color in bar chart based on job status.
I get below messages:
Job XYZ Finished in 275 seconds
Job XYZ Finished with errors in 454 seconds
Job XYZ Finished in 473 seconds
I tried different way but it's not working out, Can anyone help on it? Thank
index=stg_index "Job Finished in" OR "Job Finished with errors in"
| rex "in (?<Num>[^\s]+) seconds"
| timechart values(Num) as ExecutionTime span=60min
| sort _time

We need to split the job statuses into different series (e.g.
failedandok). Here is a run anywhere example based off your initial search:Here is a specific adaptation of your initial search:
By default Splunk will give each series a different colour. If you specifically want it to be red then you'll need to save your search in a dashboard. To add specific colours to a simple XML dashboard then you can add the following tag to the XML, here is a red and green example:
Also FYI, using
values(Num)in a timechart might cause a particular entry to be hidden if two or more events reside in the same span within the same series. Consider using max(Num), min(Num) or avg(Num) depending on the context of your dashboard.