Dashboards & Visualizations

How to set the size of the Single Value Panel title uniform throughout the dashboard?

kumargaurav
New Member

I have a dashboard having a number of Single value Panels but having a different title with different size(I mean the number of letters in the title).Due to which alignment of Panel in the dashboard doesn't look good. I want to make it uniform.
Source Code:

<panel>
  <single>
    <title>15-TBB Ordersssssssssssssssssssfgfhgfhfghfghfghfghfghfghfghfghfghfghfghfghfghfsssssssssssssssssssssssssssssss</title>
    <search>
      <query>index=xyz "Prospect Management data capture eligibility for request uri: '/build-your-bundle/ajax/captureprospectdetailscompleteorder', method: 'GET', eligibility: 'true'" | dedup _time,host,source,_raw | stats count</query>
      <earliest>-1d@d</earliest>
      <latest>@d</latest>
    </search>
    <option name="colorMode">block</option>
    <option name="drilldown">none</option>
    <option name="linkView">search</option>
    <option name="useColors">1</option>
  </single>
</panel>
0 Karma
1 Solution

niketn
Legend

@kumargaurav, following are the two option you can try,

1) Add to Single value Caption using Format Visualization option which adds Simple XML Configuration like the following:

<option name="underLabel">Abcdefghijklmnopqrstuvwxyz1234567890 Abcdefghijklmnopqrstuvwxyz1234567890</option>

This will move all the Title below single value. This can accommodate for longer text in single line as compared to title but will truncate before and/or after since it is always single line.
2) Create a dummy row with same count of panels as Single Value Panels and use only for <title>
Please refer to screenshot below. First row is one with issue. Second is the option with Caption and Third row is solution with separate dummy row with empty panels having <title>

alt text

Following is the Simple XML code:

<dashboard>
  <label>Single Value Alignment</label>
  <row>
    <panel>
      <title>Abcdefghijklmnopqrstuvwxyz1234567890 Abcdefghijklmnopqrstuvwxyz1234567890</title>
      <single>
        <search>
          <query>index=_internal sourcetype=splunkd log_level=INFO
| stats count</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
        </search>
        <option name="colorMode">block</option>
        <option name="drilldown">none</option>
        <option name="refresh.display">progressbar</option>
        <option name="useColors">1</option>
      </single>
    </panel>
    <panel>
      <title>Abcdefghijkl</title>      
      <single>
        <search>
          <query>index=_internal sourcetype=splunkd log_level=ERROR
| stats count</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
        </search>
        <option name="colorMode">block</option>
        <option name="drilldown">none</option>
        <option name="refresh.display">progressbar</option>
        <option name="useColors">1</option>
      </single>
    </panel>
    <panel>
      <title>Abcdefghijklmnopqrstuvwxyz1234567890</title>
      <single>
        <search>
          <query>index=_internal sourcetype=splunkd log_level=WARN
| stats count</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
        </search>
        <option name="colorMode">block</option>
        <option name="drilldown">none</option>
        <option name="rangeValues">[0,200,500,1000]</option>
        <option name="refresh.display">progressbar</option>
        <option name="useColors">1</option>
      </single>
    </panel>
    <panel>
      <title>Abcdefghijklmnopqrstuvwxyz1234567890 Abcdefghijklmnopqrstuvwxyz1234567890 Abcdefghijklmnopqrstuvwxyz1234567890 Abcdefghijklmnopqrstuvwxyz123</title>
      <single>
        <search>
          <query>index=_internal sourcetype=splunkd log_level!=INFO
| stats count by component
| table count</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
        </search>
        <option name="colorMode">block</option>
        <option name="drilldown">none</option>
        <option name="refresh.display">progressbar</option>
        <option name="useColors">1</option>
      </single>
    </panel>
    <panel>
      <title>Abcdefghijklmnopqr1234567890</title>
      <single>
        <search>
          <query>index=_internal sourcetype=splunkd log_level!=INFO
| stats count by date_mday</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
        </search>
        <option name="colorMode">block</option>
        <option name="drilldown">none</option>
        <option name="refresh.display">progressbar</option>
        <option name="useColors">1</option>
      </single>
    </panel>
    <panel>
      <title>Abcdefghijklm87239473no 128138213682732</title>
      <single>
        <search>
          <query>index=_internal sourcetype=splunkd log_level!=INFO
| stats count by date_hour</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
        </search>
        <option name="colorMode">block</option>
        <option name="drilldown">none</option>
        <option name="refresh.display">progressbar</option>
        <option name="useColors">1</option>
      </single>
    </panel>
  </row>
  <row>
    <panel>
      <single>
        <search>
          <query>index=_internal sourcetype=splunkd log_level=INFO
| stats count</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
        </search>
        <option name="colorMode">block</option>
        <option name="drilldown">none</option>
        <option name="refresh.display">progressbar</option>
        <option name="underLabel">Abcdefghijklmnopqrstuvwxyz1234567890 Abcdefghijklmnopqrstuvwxyz1234567890</option>
        <option name="useColors">1</option>
      </single>
      <single>
        <search>
          <query>index=_internal sourcetype=splunkd log_level=ERROR
| stats count</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
        </search>
        <option name="colorMode">block</option>
        <option name="drilldown">none</option>
        <option name="refresh.display">progressbar</option>
        <option name="underLabel">Abcdefghijkl</option>
        <option name="useColors">1</option>
      </single>
      <single>
        <search>
          <query>index=_internal sourcetype=splunkd log_level=WARN
| stats count</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
        </search>
        <option name="colorMode">block</option>
        <option name="drilldown">none</option>
        <option name="rangeValues">[0,200,500,1000]</option>
        <option name="refresh.display">progressbar</option>
        <option name="underLabel">Abcdefghijklmnopqrstuvwxyz1234567890</option>
        <option name="useColors">1</option>
      </single>
      <single>
        <search>
          <query>index=_internal sourcetype=splunkd log_level!=INFO
| stats count by component
| table count</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
        </search>
        <option name="colorMode">block</option>
        <option name="drilldown">none</option>
        <option name="refresh.display">progressbar</option>
        <option name="underLabel">Abcdefghijklmnopqrstuvwxyz1234567890 Abcdefghijklmnopqrstuvwxyz1234567890 Abcdefghijklmnopqrstuvwxyz1234567890 Abcdefghijklmnopqrstuvwxyz123</option>
        <option name="useColors">1</option>
      </single>
      <single>
        <search>
          <query>index=_internal sourcetype=splunkd log_level!=INFO
| stats count by date_mday</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
        </search>
        <option name="colorMode">block</option>
        <option name="drilldown">none</option>
        <option name="refresh.display">progressbar</option>
        <option name="underLabel">Abcdefghijklmnopqr1234567890</option>
        <option name="useColors">1</option>
      </single>
      <single>
        <search>
          <query>index=_internal sourcetype=splunkd log_level!=INFO
| stats count by date_hour</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
        </search>
        <option name="colorMode">block</option>
        <option name="drilldown">none</option>
        <option name="refresh.display">progressbar</option>
        <option name="underLabel">Abcdefghijklm87239473no 128138213682732</option>
        <option name="useColors">1</option>
      </single>
    </panel>
  </row>
  <row>
    <panel>
      <title>Abcdefghijklmnopqrstuvwxyz1234567890 Abcdefghijklmnopqrstuvwxyz1234567890</title>
    </panel>
    <panel>
      <title>Abcdefghijkl</title>
    </panel>
    <panel>
      <title>Abcdefghijklmnopqrstuvwxyz1234567890</title>
    </panel>
    <panel>
      <title>Abcdefghijklmnopqrstuvwxyz1234567890 Abcdefghijklmnopqrstuvwxyz1234567890 Abcdefghijklmnopqrstuvwxyz1234567890 Abcdefghijklmnopqrstuvwxyz123</title>
    </panel>
    <panel>
      <title>Abcdefghijklmnopqr1234567890</title>
    </panel>
    <panel>
      <title>Abcdefghijklm87239473no 128138213682732</title>
    </panel>
  </row>
  <row>
    <panel>
      <single>
        <search>
          <query>index=_internal sourcetype=splunkd log_level=INFO
| stats count</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
        </search>
        <option name="colorMode">block</option>
        <option name="drilldown">none</option>
        <option name="refresh.display">progressbar</option>
        <option name="useColors">1</option>
      </single>
      <single>
        <search>
          <query>index=_internal sourcetype=splunkd log_level=ERROR
| stats count</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
        </search>
        <option name="colorMode">block</option>
        <option name="drilldown">none</option>
        <option name="refresh.display">progressbar</option>
        <option name="useColors">1</option>
      </single>
      <single>
        <search>
          <query>index=_internal sourcetype=splunkd log_level=WARN
| stats count</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
        </search>
        <option name="colorMode">block</option>
        <option name="drilldown">none</option>
        <option name="rangeValues">[0,200,500,1000]</option>
        <option name="refresh.display">progressbar</option>
        <option name="useColors">1</option>
      </single>
      <single>
        <search>
          <query>index=_internal sourcetype=splunkd log_level!=INFO
| stats count by component
| table count</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
        </search>
        <option name="colorMode">block</option>
        <option name="drilldown">none</option>
        <option name="refresh.display">progressbar</option>
        <option name="useColors">1</option>
      </single>
      <single>
        <search>
          <query>index=_internal sourcetype=splunkd log_level!=INFO
| stats count by date_mday</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
        </search>
        <option name="colorMode">block</option>
        <option name="drilldown">none</option>
        <option name="refresh.display">progressbar</option>
        <option name="useColors">1</option>
      </single>
      <single>
        <search>
          <query>index=_internal sourcetype=splunkd log_level!=INFO
| stats count by date_hour</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
        </search>
        <option name="colorMode">block</option>
        <option name="drilldown">none</option>
        <option name="refresh.display">progressbar</option>
        <option name="useColors">1</option>
      </single>
    </panel>
  </row>
</dashboard>
____________________________________________
| makeresults | eval message= "Happy Splunking!!!"

View solution in original post

0 Karma

kumargaurav
New Member

Thanks a lot @niketnilay. It worked

0 Karma

niketn
Legend

@kumargaurav, following are the two option you can try,

1) Add to Single value Caption using Format Visualization option which adds Simple XML Configuration like the following:

<option name="underLabel">Abcdefghijklmnopqrstuvwxyz1234567890 Abcdefghijklmnopqrstuvwxyz1234567890</option>

This will move all the Title below single value. This can accommodate for longer text in single line as compared to title but will truncate before and/or after since it is always single line.
2) Create a dummy row with same count of panels as Single Value Panels and use only for <title>
Please refer to screenshot below. First row is one with issue. Second is the option with Caption and Third row is solution with separate dummy row with empty panels having <title>

alt text

Following is the Simple XML code:

<dashboard>
  <label>Single Value Alignment</label>
  <row>
    <panel>
      <title>Abcdefghijklmnopqrstuvwxyz1234567890 Abcdefghijklmnopqrstuvwxyz1234567890</title>
      <single>
        <search>
          <query>index=_internal sourcetype=splunkd log_level=INFO
| stats count</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
        </search>
        <option name="colorMode">block</option>
        <option name="drilldown">none</option>
        <option name="refresh.display">progressbar</option>
        <option name="useColors">1</option>
      </single>
    </panel>
    <panel>
      <title>Abcdefghijkl</title>      
      <single>
        <search>
          <query>index=_internal sourcetype=splunkd log_level=ERROR
| stats count</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
        </search>
        <option name="colorMode">block</option>
        <option name="drilldown">none</option>
        <option name="refresh.display">progressbar</option>
        <option name="useColors">1</option>
      </single>
    </panel>
    <panel>
      <title>Abcdefghijklmnopqrstuvwxyz1234567890</title>
      <single>
        <search>
          <query>index=_internal sourcetype=splunkd log_level=WARN
| stats count</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
        </search>
        <option name="colorMode">block</option>
        <option name="drilldown">none</option>
        <option name="rangeValues">[0,200,500,1000]</option>
        <option name="refresh.display">progressbar</option>
        <option name="useColors">1</option>
      </single>
    </panel>
    <panel>
      <title>Abcdefghijklmnopqrstuvwxyz1234567890 Abcdefghijklmnopqrstuvwxyz1234567890 Abcdefghijklmnopqrstuvwxyz1234567890 Abcdefghijklmnopqrstuvwxyz123</title>
      <single>
        <search>
          <query>index=_internal sourcetype=splunkd log_level!=INFO
| stats count by component
| table count</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
        </search>
        <option name="colorMode">block</option>
        <option name="drilldown">none</option>
        <option name="refresh.display">progressbar</option>
        <option name="useColors">1</option>
      </single>
    </panel>
    <panel>
      <title>Abcdefghijklmnopqr1234567890</title>
      <single>
        <search>
          <query>index=_internal sourcetype=splunkd log_level!=INFO
| stats count by date_mday</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
        </search>
        <option name="colorMode">block</option>
        <option name="drilldown">none</option>
        <option name="refresh.display">progressbar</option>
        <option name="useColors">1</option>
      </single>
    </panel>
    <panel>
      <title>Abcdefghijklm87239473no 128138213682732</title>
      <single>
        <search>
          <query>index=_internal sourcetype=splunkd log_level!=INFO
| stats count by date_hour</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
        </search>
        <option name="colorMode">block</option>
        <option name="drilldown">none</option>
        <option name="refresh.display">progressbar</option>
        <option name="useColors">1</option>
      </single>
    </panel>
  </row>
  <row>
    <panel>
      <single>
        <search>
          <query>index=_internal sourcetype=splunkd log_level=INFO
| stats count</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
        </search>
        <option name="colorMode">block</option>
        <option name="drilldown">none</option>
        <option name="refresh.display">progressbar</option>
        <option name="underLabel">Abcdefghijklmnopqrstuvwxyz1234567890 Abcdefghijklmnopqrstuvwxyz1234567890</option>
        <option name="useColors">1</option>
      </single>
      <single>
        <search>
          <query>index=_internal sourcetype=splunkd log_level=ERROR
| stats count</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
        </search>
        <option name="colorMode">block</option>
        <option name="drilldown">none</option>
        <option name="refresh.display">progressbar</option>
        <option name="underLabel">Abcdefghijkl</option>
        <option name="useColors">1</option>
      </single>
      <single>
        <search>
          <query>index=_internal sourcetype=splunkd log_level=WARN
| stats count</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
        </search>
        <option name="colorMode">block</option>
        <option name="drilldown">none</option>
        <option name="rangeValues">[0,200,500,1000]</option>
        <option name="refresh.display">progressbar</option>
        <option name="underLabel">Abcdefghijklmnopqrstuvwxyz1234567890</option>
        <option name="useColors">1</option>
      </single>
      <single>
        <search>
          <query>index=_internal sourcetype=splunkd log_level!=INFO
| stats count by component
| table count</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
        </search>
        <option name="colorMode">block</option>
        <option name="drilldown">none</option>
        <option name="refresh.display">progressbar</option>
        <option name="underLabel">Abcdefghijklmnopqrstuvwxyz1234567890 Abcdefghijklmnopqrstuvwxyz1234567890 Abcdefghijklmnopqrstuvwxyz1234567890 Abcdefghijklmnopqrstuvwxyz123</option>
        <option name="useColors">1</option>
      </single>
      <single>
        <search>
          <query>index=_internal sourcetype=splunkd log_level!=INFO
| stats count by date_mday</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
        </search>
        <option name="colorMode">block</option>
        <option name="drilldown">none</option>
        <option name="refresh.display">progressbar</option>
        <option name="underLabel">Abcdefghijklmnopqr1234567890</option>
        <option name="useColors">1</option>
      </single>
      <single>
        <search>
          <query>index=_internal sourcetype=splunkd log_level!=INFO
| stats count by date_hour</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
        </search>
        <option name="colorMode">block</option>
        <option name="drilldown">none</option>
        <option name="refresh.display">progressbar</option>
        <option name="underLabel">Abcdefghijklm87239473no 128138213682732</option>
        <option name="useColors">1</option>
      </single>
    </panel>
  </row>
  <row>
    <panel>
      <title>Abcdefghijklmnopqrstuvwxyz1234567890 Abcdefghijklmnopqrstuvwxyz1234567890</title>
    </panel>
    <panel>
      <title>Abcdefghijkl</title>
    </panel>
    <panel>
      <title>Abcdefghijklmnopqrstuvwxyz1234567890</title>
    </panel>
    <panel>
      <title>Abcdefghijklmnopqrstuvwxyz1234567890 Abcdefghijklmnopqrstuvwxyz1234567890 Abcdefghijklmnopqrstuvwxyz1234567890 Abcdefghijklmnopqrstuvwxyz123</title>
    </panel>
    <panel>
      <title>Abcdefghijklmnopqr1234567890</title>
    </panel>
    <panel>
      <title>Abcdefghijklm87239473no 128138213682732</title>
    </panel>
  </row>
  <row>
    <panel>
      <single>
        <search>
          <query>index=_internal sourcetype=splunkd log_level=INFO
| stats count</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
        </search>
        <option name="colorMode">block</option>
        <option name="drilldown">none</option>
        <option name="refresh.display">progressbar</option>
        <option name="useColors">1</option>
      </single>
      <single>
        <search>
          <query>index=_internal sourcetype=splunkd log_level=ERROR
| stats count</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
        </search>
        <option name="colorMode">block</option>
        <option name="drilldown">none</option>
        <option name="refresh.display">progressbar</option>
        <option name="useColors">1</option>
      </single>
      <single>
        <search>
          <query>index=_internal sourcetype=splunkd log_level=WARN
| stats count</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
        </search>
        <option name="colorMode">block</option>
        <option name="drilldown">none</option>
        <option name="rangeValues">[0,200,500,1000]</option>
        <option name="refresh.display">progressbar</option>
        <option name="useColors">1</option>
      </single>
      <single>
        <search>
          <query>index=_internal sourcetype=splunkd log_level!=INFO
| stats count by component
| table count</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
        </search>
        <option name="colorMode">block</option>
        <option name="drilldown">none</option>
        <option name="refresh.display">progressbar</option>
        <option name="useColors">1</option>
      </single>
      <single>
        <search>
          <query>index=_internal sourcetype=splunkd log_level!=INFO
| stats count by date_mday</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
        </search>
        <option name="colorMode">block</option>
        <option name="drilldown">none</option>
        <option name="refresh.display">progressbar</option>
        <option name="useColors">1</option>
      </single>
      <single>
        <search>
          <query>index=_internal sourcetype=splunkd log_level!=INFO
| stats count by date_hour</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
        </search>
        <option name="colorMode">block</option>
        <option name="drilldown">none</option>
        <option name="refresh.display">progressbar</option>
        <option name="useColors">1</option>
      </single>
    </panel>
  </row>
</dashboard>
____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma
Get Updates on the Splunk Community!

Detecting Remote Code Executions With the Splunk Threat Research Team

REGISTER NOWRemote code execution (RCE) vulnerabilities pose a significant risk to organizations. If ...

Observability | Use Synthetic Monitoring for Website Metadata Verification

If you are on Splunk Observability Cloud, you may already have Synthetic Monitoringin your observability ...

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...