Need to build a server dashboard that displays servers for each application and the status of server in a graphical representation if it's up or down. Please see the attached screenshot and suggest on how to achieve.
sample:
<dashboard>
<label>sample status dashboard</label>
<search id="base">
<query>| makeresults count=5
| streamstats count
| eval apps="apps_".count
| eval host=split("ABCDEF","")
| mvexpand host
| eval status=mvindex(split("up,down",","),random() % 2)
| rex "(?<comment>(?# query))"
| chart values(status) as status by host apps</query>
<earliest>-24h@h</earliest>
<latest>now</latest>
<sampleRatio>1</sampleRatio>
</search>
<row>
<panel>
<table>
<title>apps_1</title>
<search base="base">
<query>| table host apps_1</query>
</search>
<format type="color" field="apps_1">
<colorPalette type="map">{"up":#00ff00, "down":#ff0000}
</colorPalette>
</format>
</table>
</panel>
<panel>
<table>
<title>apps_2</title>
<search base="base">
<query>| table host apps_2</query>
</search>
<format type="color" field="apps_2">
<colorPalette type="map">{"up":#00ff00, "down":#ff0000}
</colorPalette>
</format>
</table>
</panel>
<panel>
<table>
<title>apps_3</title>
<search base="base">
<query>| table host apps_3</query>
</search>
<format type="color" field="apps_3">
<colorPalette type="map">{"up":#00ff00, "down":#ff0000}
</colorPalette>
</format>
</table>
</panel>
<panel>
<table>
<title>apps_4</title>
<search base="base">
<query>| table host apps_4</query>
</search>
<format type="color" field="apps_4">
<colorPalette type="map">{"up":#00ff00, "down":#ff0000}
</colorPalette>
</format>
</table>
</panel>
<panel>
<table>
<title>apps_5</title>
<search base="base">
<query>| table host apps_5</query>
</search>
<format type="color" field="apps_5">
<colorPalette type="map">{"up":#00ff00, "down":#ff0000}
</colorPalette>
</format>
</table>
</panel>
</row>
</dashboard>
This is what it looks like if you create it without using CSS or anything else.
Thanks for the solution. I am using inputlookup of the list of hosts and if the logs report, the server status is shown as up if not down. Will this solution work for my query?
This just makes a table in a chart and select it, so it's okay.
I just copied the code and it looks great. Do you think you can help me further from here? How can I plug in my search query into this? Please help. The attached screenshot has the query and the app names.
Hi, following up on my previous question.
Let's make it first.
Any luck?
ohk, thanks @Uday but, then,.. whats the next step you would like to proceed.. i could not understand your question actually.
Best Regards,
Sekar
I want to display the dashboard as shown in the attached screenshot.
Hi @Uday .. its a lengthy process and you should tell us clearly where you are right now..
the logs already onboarded? are you able to create some basic dashboards? the image looks like a good fit for the "rangemap" command, maybe please check that command, this command gives similar to "traffic light" kind of displays for the dashboards..
once update more clear info, then, we can proceed, one step at a time, step by step, to achieve your goal. thanks.
Best Regards,
Sekar
Thank you for the reply. Right now I have a simple dashboard that displays server status based on each application. Please see attachment for the xml.