Dashboards & Visualizations

How to build a dashboard for server monitoring?

Uday
Explorer

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.

Labels (3)
Tags (2)

to4kawa
Ultra Champion

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 "(?&lt;comment&gt;(?# 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.

Uday
Explorer

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?

0 Karma

to4kawa
Ultra Champion

This just makes a table in a chart and select it, so it's okay.

0 Karma

Uday
Explorer

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.

Uday
Explorer

Hi, following up on my previous question.

0 Karma

to4kawa
Ultra Champion

Let's make it first.

 

0 Karma

Uday
Explorer

Any luck?

0 Karma

inventsekar
Super Champion

ohk, thanks @Uday  but, then,.. whats the next step you would like to proceed.. i could not understand your question actually. 

 

Best Regards,

Sekar

PS ... If any post helped you in any way, pls give a hi-five to the author with an upvote. if your issue got resolved, please accept the reply as solution.. thanks.
0 Karma

Uday
Explorer

I want to display the dashboard as shown in the attached screenshot.

0 Karma

inventsekar
Super Champion

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

PS ... If any post helped you in any way, pls give a hi-five to the author with an upvote. if your issue got resolved, please accept the reply as solution.. thanks.
0 Karma

Uday
Explorer

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.

0 Karma
Get Updates on the Splunk Community!

New Splunk Observability innovations: Deeper visibility and smarter alerting to ...

You asked, we delivered. Splunk Observability Cloud has several new innovations giving you deeper visibility ...

Synthetic Monitoring: Not your Grandma’s Polyester! Tech Talk: DevOps Edition

Register today and join TekStream on Tuesday, February 28 at 11am PT/2pm ET for a demonstration of Splunk ...

Instrumenting Java Websocket Messaging

Instrumenting Java Websocket MessagingThis article is a code-based discussion of passing OpenTelemetry trace ...