Dashboards & Visualizations

Editing the other value for a pie chart

Abass42
Communicator

I have a query that is executing a stats count by source type, as we want to see how many sensitive files leave our firm and the quantity. I am doing an appendcols and then transposing

Abass42_0-1746733170271.png

In the dashboard, the pie chart look like:

Abass42_1-1746733282019.png

 

 

index=fortinet dlpextra IN (WatermarkBlock1,Log_WatermarkBlock2,Log_WatermarkBlock3,Log_WatermarkBlock4)  | lookup DataF.csv dlpextra OUTPUT C_Label as C_Label
| stats count as Proxy
| appendcols
    [search index=iron AutomaticClassification
| lookup IPort_Class.csv DLP_Class OUTPUT C_Label as C_Label
| stats count as Email]

| appendcols
    [search index=035 "Common.DeviceName"="p151.d.com" OR Common.DeviceName="p1p71.c.com" "SensitiveInfoTypeData{}.SensitiveInfoTypeName"=*
| table SensitiveInfoTypeData{}.SensitiveInfoTypeName 
| stats count as SFTP
]
| appendcols
    [search index=testing sourcetype="net:alert" dlp_rule="AZ C*"
| eval dlp_rule=replace(dlp_rule, "AB", "")
| stats count as Netskope]
| transpose
| rename "row 1" as Count

My question is, how would you edit the Splunk query to rename the column name to the value I provided instead of Other. 

DO i even need a transpose? That has been the best way I have found for creating a pie chart out of different data sources. 

Preferably, id like to understand how to do that with the JSON formatting I get with Dashboard studio, as well as figure out how to do it inline, within the query. 

 

Thanks

 

Labels (2)
0 Karma

richgalloway
SplunkTrust
SplunkTrust

Try this query that does not use appends or transpose.

(index=fortinet dlpextra IN (WatermarkBlock1,Log_WatermarkBlock2,Log_WatermarkBlock3,Log_WatermarkBlock4))
OR (index=035 "Common.DeviceName"="p151.d.com" OR Common.DeviceName="p1p71.c.com" "SensitiveInfoTypeData{}.SensitiveInfoTypeName"=*)
OR (index=iron AutomaticClassification)
OR (index=testing sourcetype="net:alert" dlp_rule="AZ C*")
| eval type = case(index=fortinet, "Proxy",
                   index=iron, "Email",
                   index=035, "SFTP",
                   index=testing, "Netskope",
                   1==1, "Unknown")
| stats count by type
---
If this reply helps you, Karma would be appreciated.
0 Karma

Abass42
Communicator

I am working on implementing this query, but I need to rename and standardize the output to the C_Label values so i can stats count on those. I need a count per source. I dont think i cram my eval statements with the OR statements. Ill try to incorporate this in my query

 

Thanks

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Take Action Automatically on Splunk Alerts with Red Hat Ansible Automation Platform

 Are you ready to revolutionize your IT operations? As digital transformation accelerates, the demand for ...

Calling All Security Pros: Ready to Race Through Boston?

Hey Splunkers, .conf25 is heading to Boston and we’re kicking things off with something bold, competitive, and ...

Beyond Detection: How Splunk and Cisco Integrated Security Platforms Transform ...

Financial services organizations face an impossible equation: maintain 99.9% uptime for mission-critical ...