Splunk Search

How to create aa chart using xyseries command syntax?

Ahmedkhalil
Path Finder

Dears,

i would like to create chart that contain two different x axis and one y axis using xyseries command
but i couldn't locate the correct syntax the guide say that correct synatx as below but it's not working for me
xyseries x-fieldname y-name-field y-data-field
ex: xyseries x-host x-ipaddress y-name-sourcetype y-data-value

any help please!
thanks in adavnce

Labels (1)
Tags (1)
0 Karma
1 Solution

somesoni2
SplunkTrust
SplunkTrust

It will be a 3 step process, (xyseries will give data with 2 columns x and y).

Step 1) Concatenate your x-host and x-ipaddress into 1 field, say temp
Step 2) Run your xyseries with temp y-name-sourcetype y-data-value.
Step 3) Use Rex/eval-split to separate temp as x=host and x-ipaddress

Sample:

index=_internal | stats count by sourcetype source component | eval temp=source."#".component | xyseries temp sourcetype count
| rex field=temp "(?<source>.*)#(?<component>.*)" | fields - temp

View solution in original post

somesoni2
SplunkTrust
SplunkTrust

It will be a 3 step process, (xyseries will give data with 2 columns x and y).

Step 1) Concatenate your x-host and x-ipaddress into 1 field, say temp
Step 2) Run your xyseries with temp y-name-sourcetype y-data-value.
Step 3) Use Rex/eval-split to separate temp as x=host and x-ipaddress

Sample:

index=_internal | stats count by sourcetype source component | eval temp=source."#".component | xyseries temp sourcetype count
| rex field=temp "(?<source>.*)#(?<component>.*)" | fields - temp

tarun_l
Engager

Thanks for your solution - it helped.

0 Karma

Ahmedkhalil
Path Finder

many thanks for your answer

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...