Refine your search:

Hi, i have my results :

Host | max(usage)

ABC | 100

xyz | 200

I want to add new column in table with max(usage) in last 24 hours by host.

| Max usage (last 24 hours)

| 90
| 200

I am using following query : index="power" sourcetype="power_usage" | join [ search index="power" sourcetype="power_usage" earliest=-24h | stats max(Power_consumption) by host ]| chart max(Power_consumption) over host

Following error occur wit the query:- [subsearch]: Your timerange was substituted based on your search string

If any body knows the solution, please let me know.

Thanks in advance.

asked 17 May '11, 06:26

geetanjali's gravatar image

geetanjali
51219
accept rate: 0%


2 Answers:

By the way, have you tried the eventstats function? It attaches a summary statistics to each event.

Regards, Olivier

link

answered 17 May '11, 06:54

OL's gravatar image

OL
24928
accept rate: 15%

Olivier is right eventstats might be a more appropriate command than "join" i suggested to you in another thread

(17 May '11, 06:59) MarioM

Hello,

I don't have the answer, but I can see a problem with the join function. It needs the field-list parameter as you can see in http://www.splunk.com/base/Documentation/latest/SearchReference/Join. In other word, you need to join your subsearch to something and the "field-list" is the common link between both search.

Hope it helps.

Regards, Olivier

link

answered 17 May '11, 06:45

OL's gravatar image

OL
24928
accept rate: 15%

Post your answer
toggle preview

Follow this question

Log In to enable email subscriptions

RSS:

Answers

Answers + Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×1,651

Asked: 17 May '11, 06:26

Seen: 1,173 times

Last updated: 17 May '11, 07:01

Copyright © 2005-2012 Splunk Inc. All rights reserved.