Dashboards & Visualizations

How to create charts for each host dynamically in a dashboard using simple xml?

rodrigorenie
Explorer

Hello everyone.

I have a very simple search which I use to create a 100% Stack Bar showing the availability of a specific host:

host=myhostname index=availability sourcetype="avail" | stats avg(unavail) AS Unavailability, avg(avail) AS Availability by host

I know I could just replace the "myhostname" with "*" and create one graph with several host entries displaying their availability, but what I'd like to do is create one graph for each host on a Dashboard dynamically, that is, if a new server starts to send logs do splunk, this dashboard will automatically create a new graph containing it's availability.

And I need to do this using Simple XML (if possible), my access to our Splunk server is currently limited. So far, I found the "depends" property which I can use with the "chart" element, which means that this chart will only be displayed if the tokens in the "depends" property actually exists, but I could figure out a way to use it.

Any ideas?

Thanks!

wpreston
Motivator

Have you tried using multi-series mode? Just set multi-series mode to "yes" in your chart properties and Splunk will make a different chart for each of the field you are splitting by (host in your case). This won't give each chart its own panel, but it will give a chart for each host. Is that close enough?

0 Karma

wpreston
Motivator

Oops, doesn't quite work they way I thought. Disregard this answer.

0 Karma
Get Updates on the Splunk Community!

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...