Sample Splunk Query

index="lamaxu" sourcetype="qmstatus_json"  "identifier.dataType"=QMGR_STATUS "identifier.dataSource"=TEST|rename attributes.STATUS as qmstatus|eval status = if(like(qmstatus,"RUNNING"), 0, 1)|table status | rangemap field=status low=0-0 default=severe | eval status=case(status== 0, "TEST", status== 1, "TEST")

Trellis Dashboard Query (Splunk 6.7 and above)

Using Trellis creates a dynamic view of the Queue Manager statuses. It does not require the dashboard to be edited when new channels are added.

 

index="lamaxu" sourcetype="qmstatus_json"  "identifier.dataType"=QMGR_STATUS |rename identifier.dataSource as qmgrName| rename attributes.STATUS as qmStatus|eval label="(".qmgrName.") - ".qmStatus|eval status = case(like(qmStatus,"RUNNING"), 0, like(chlstatus,"STOPPED"),1)|chart max(status) by label

Sample Dashboard

Dashboard Source

<dashboard>
  <label>Queue Manager Status</label>
  <row>
    <panel>
      <single>
        <search>
          <query>index="lamaxu" sourcetype="qmstatus_json"  "identifier.dataType"=QMGR_STATUS "identifier.dataSource"=DEMO|rename attributes.STATUS as qmstatus|eval status = if(like(qmstatus,"RUNNING"), 0, 1)|table status | rangemap field=status low=0-0 default=severe | eval status=case(status== 0, "DEMO", status== 1, "DEMO")</query>
          <earliest>rt-5m</earliest>
          <latest>rt</latest>
          <sampleRatio>1</sampleRatio>
        </search>
        <option name="colorBy">value</option>
        <option name="colorMode">block</option>
        <option name="drilldown">none</option>
        <option name="numberPrecision">0</option>
        <option name="rangeColors">["0xd93f3c","0x65a637","0xf7bc38","0xf58f39","0xd93f3c"]</option>
        <option name="rangeValues">[0,30,70,100]</option>
        <option name="refresh.display">progressbar</option>
        <option name="showSparkline">1</option>
        <option name="showTrendIndicator">1</option>
        <option name="trellis.enabled">0</option>
        <option name="trellis.scales.shared">1</option>
        <option name="trellis.size">medium</option>
        <option name="trendColorInterpretation">standard</option>
        <option name="trendDisplayMode">absolute</option>
        <option name="underLabel">QMGR Status</option>
        <option name="unitPosition">after</option>
        <option name="useColors">0</option>
        <option name="useThousandSeparators">1</option>
      </single>
    </panel>
    <panel>
      <single>
        <search>
          <query>index="lamaxu" sourcetype="qmstatus_json"  "identifier.dataType"=QMGR_STATUS "identifier.dataSource"=TEST|rename attributes.STATUS as qmstatus|eval status = if(like(qmstatus,"RUNNING"), 0, 1)|table status | rangemap field=status low=0-0 default=severe | eval status=case(status== 0, "TEST", status== 1, "TEST")</query>
          <earliest>rt-5m</earliest>
          <latest>rt</latest>
          <sampleRatio>1</sampleRatio>
        </search>
        <option name="colorBy">value</option>
        <option name="colorMode">block</option>
        <option name="drilldown">none</option>
        <option name="numberPrecision">0</option>
        <option name="rangeColors">["0xd93f3c","0x65a637","0xf7bc38","0xf58f39","0xd93f3c"]</option>
        <option name="rangeValues">[0,1,10,100]</option>
        <option name="refresh.display">progressbar</option>
        <option name="showSparkline">1</option>
        <option name="showTrendIndicator">1</option>
        <option name="trellis.enabled">0</option>
        <option name="trellis.scales.shared">1</option>
        <option name="trellis.size">medium</option>
        <option name="trendColorInterpretation">standard</option>
        <option name="trendDisplayMode">absolute</option>
        <option name="underLabel">QMGR Status</option>
        <option name="unitPosition">after</option>
        <option name="useColors">0</option>
        <option name="useThousandSeparators">1</option>
      </single>
    </panel>
    <panel>
      <single>
        <search>
          <query>index="lamaxu" sourcetype="qmstatus_json"  "identifier.dataType"=QMGR_STATUS "identifier.dataSource"=TEST1|rename attributes.STATUS as qmstatus|eval status = if(like(qmstatus,"RUNNING"), 0, 1)|table status | rangemap field=status low=0-0 default=severe | eval status=case(status== 0, "TEST1", status== 1, "TEST1")</query>
          <earliest>rt-5m</earliest>
          <latest>rt</latest>
          <sampleRatio>1</sampleRatio>
        </search>
        <option name="colorBy">value</option>
        <option name="colorMode">block</option>
        <option name="drilldown">none</option>
        <option name="numberPrecision">0</option>
        <option name="rangeColors">["0xd93f3c","0x65a637","0xf7bc38","0xf58f39","0xd93f3c"]</option>
        <option name="rangeValues">[0,1,10,100]</option>
        <option name="refresh.display">progressbar</option>
        <option name="showSparkline">1</option>
        <option name="showTrendIndicator">1</option>
        <option name="trellis.enabled">0</option>
        <option name="trellis.scales.shared">1</option>
        <option name="trellis.size">medium</option>
        <option name="trendColorInterpretation">standard</option>
        <option name="trendDisplayMode">absolute</option>
        <option name="underLabel">QMGR Status</option>
        <option name="unitPosition">after</option>
        <option name="useColors">0</option>
        <option name="useThousandSeparators">1</option>
      </single>
    </panel>
    <panel>
      <single>
        <search>
          <query>index="lamaxu" sourcetype="qmstatus_json"  "identifier.dataType"=QMGR_STATUS "identifier.dataSource"=TEST|rename attributes.STATUS as qmstatus|eval status = if(like(qmstatus,"RUNNING"), 0, 1)|table status | rangemap field=status low=0-0 default=severe | eval status=case(status== 0, "TEST2", status== 1, "TEST2")</query>
          <earliest>rt-5m</earliest>
          <latest>rt</latest>
          <sampleRatio>1</sampleRatio>
        </search>
        <option name="colorBy">value</option>
        <option name="colorMode">block</option>
        <option name="drilldown">none</option>
        <option name="numberPrecision">0</option>
        <option name="rangeColors">["0xd93f3c","0x65a637","0xf7bc38","0xf58f39","0xd93f3c"]</option>
        <option name="rangeValues">[0,1,10,100]</option>
        <option name="refresh.display">progressbar</option>
        <option name="showSparkline">1</option>
        <option name="showTrendIndicator">1</option>
        <option name="trellis.enabled">0</option>
        <option name="trellis.scales.shared">1</option>
        <option name="trellis.size">medium</option>
        <option name="trendColorInterpretation">standard</option>
        <option name="trendDisplayMode">absolute</option>
        <option name="underLabel">QMGR Status</option>
        <option name="unitPosition">after</option>
        <option name="useColors">0</option>
        <option name="useThousandSeparators">1</option>
      </single>
    </panel>
  </row>
</dashboard>

Queue Manager Status Trellis Dashboard

<dashboard>
  <label>Queue Manager Status - Trellis</label>  
   <row>
    <panel>
      <title>Queue Manager Status Trellis</title>
      <single>
        <title>Queue Manager Status Trellis</title>
        <search>
          <query>index="lamaxu" sourcetype="qmstatus_json"  "identifier.dataType"=QMGR_STATUS |rename identifier.dataSource as qmgrName| rename attributes.STATUS as qmStatus|eval label="(".qmgrName.") - ".qmStatus|eval status = case(like(qmStatus,"RUNNING"), 0, like(chlstatus,"STOPPED"),1)|chart max(status) by label</query>
          <earliest>rt-1h</earliest>
          <latest>rt</latest>
          <sampleRatio>1</sampleRatio>
        </search>
        <option name="colorBy">value</option>
        <option name="colorMode">block</option>
        <option name="drilldown">none</option>
        <option name="numberPrecision">0</option>
        <option name="rangeColors">["0x65a637","0xd93f3c"]</option>
        <option name="rangeValues">[0]</option>
        <option name="refresh.display">progressbar</option>
        <option name="showSparkline">1</option>
        <option name="showTrendIndicator">1</option>
        <option name="trellis.enabled">1</option>
        <option name="trellis.scales.shared">1</option>
        <option name="trellis.size">small</option>
        <option name="trellis.splitBy">label</option>
        <option name="trendColorInterpretation">standard</option>
        <option name="trendDisplayMode">absolute</option>
        <option name="underLabel">Qmgr Status</option>
        <option name="unitPosition">after</option>
        <option name="useColors">1</option>
        <option name="useThousandSeparators">1</option>
      </single>
    </panel>
  </row>
</dashboard>

 

 

Using Trellis creates a dynamic view of the Queue Manager statuses. It does not require the dashboard to be edited when new channels are added. 
  • No labels