Getting Data In

Want to see data by host

sunnyparmar
Communicator

Hi,

In the below given query i want to see the data by host but unable to see. Kindly suggest

index=sc-perfmon (counter="Avg. Disk sec/Read" OR counter="Avg. Disk sec/Write" ) by host | timechart avg(Value) by counter

Thanks
Ankit

Tags (2)
0 Karma
1 Solution

chimell
Motivator

Hi sunnyparmar
Try this search code

|set union [search index=sc-perfmon counter="Avg. Disk sec/Read"| timechart avg(Value) by host] [ search index=sc-perfmon counter="Avg. Disk sec/Write" | timechart avg(Value) by host]

View solution in original post

chimell
Motivator

Hi sunnyparmar
Try this search code

|set union [search index=sc-perfmon counter="Avg. Disk sec/Read"| timechart avg(Value) by host] [ search index=sc-perfmon counter="Avg. Disk sec/Write" | timechart avg(Value) by host]

sunnyparmar
Communicator

Hey,

thanks for the reply but it is given below error when I am running the below query

index=sc-perfmon (counter="Avg. Disk sec/Read" OR counter="Avg. Disk sec/Write" ) | set union [search index=sc-perfmon counter="Avg. Disk sec/Read"| timechart avg(Value) by host] [ search index=sc-perfmon counter="Avg. Disk sec/Write" | timechart avg(Value) by host]

ERROR

Error in 'set' command: This command must be the first command of a search.

Thanks & Regards
Sunny

0 Karma

chimell
Motivator

Don't add something to the search code that i gave you just run it
it works well will my data
Delete index=sc-perfmon (counter="Avg. Disk sec/Read" OR counter="Avg. Disk sec/Write" ) and re-run

0 Karma

chimell
Motivator

Note that the search which contain a set command always begin with | set

0 Karma

sunnyparmar
Communicator

Ultimate.. it works...thanks once again

0 Karma

chimell
Motivator

Good thanks

0 Karma

stephane_cyrill
Builder

HI TRY THIS

 index=sc-perfmon (counter="Avg. Disk sec/Read" OR counter="Avg. Disk sec/Write" )  | timechart avg(Value)  by host

sunnyparmar
Communicator

Hey,

Thanks for the reply but if I did it by host only then query runs and it is showing data by host. Then when I will click on show events under it, it will show data for further parameter (Avg. Disk sec/Read and Avg. Disk sec/Write)but what I want that it will show data hostwise for both (counter="Avg. Disk sec/Read" OR counter="Avg. Disk sec/Write") counters in output.

and

Second query is not running.. it is giving an error.

Regards
Ankit

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!

Can’t Make It to Boston? Stream .conf25 and Learn with Haya Husain

Boston may be buzzing this September with Splunk University and .conf25, but you don’t have to pack a bag to ...

Splunk Lantern’s Guide to The Most Popular .conf25 Sessions

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Unlock What’s Next: The Splunk Cloud Platform at .conf25

In just a few days, Boston will be buzzing as the Splunk team and thousands of community members come together ...