-
Notifications
You must be signed in to change notification settings - Fork 491
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
lookup inside an alert not working #1035
Comments
Try using a hard coded LookupAll to see if it is the tag matching that is failing: warn = $srv_doc_count < LookupAll(“min_doc_per_host”, “warn_min”, “host=mail-work-test”) |
Lookupall is only a template func
|
Differences between expression functions and template functions makes me a sad panda. |
Get same result with @ayashjorden.
when test alert test at Rule Editor, in History the crit is right, but get |
by the way, use LookupAll in template can get write value. |
@ayashjorden Hello, any idea about this? |
Hi @yinchuan, Yarden |
@mjibson Hello, any idea about this? |
I ran into this as well. Working with the forecasting example for disk space, I changed it to use some static numbers, and put in an extra variable to see what was happening.
I set the notification to print, and put all three in the subject line. It is printing $blah as |
I'm think that this is because we are using search, so unless you are on OpenTSDB and you are sending datapoint to /index (or relayig through bosun) search would have no results: bosun/cmd/bosun/conf/lookup.go Line 28 in 97df011
|
That func I pointed at doesn't use search data, this one does though: https://github.com/bosun-monitor/bosun/blob/master/cmd/bosun/conf/conf.go#L1209 |
@kylebrandt I though I can use the Lookup structure to write generic configuration. meaning using a lookup in alerts. |
Correct, the lookup function as is relies on search to find tag keys and values. The problem is
|
I think this is correct. I can't think of lookups having any meaning outside of this case, except maybe if you wanted to pass the value of a lookup to a function. I don't think we do that anywhere currently. |
Digging into this, I found out there is already a function that works around this that wasn't documented:
So all you have to do is pass your series into the function:
|
would be great to have this added to the documentation. took us a while to reach this thread. |
and clarify lookup() lookupsSeries was implemented in #690 but not documented yet.
Hi,
The scenario is as follows:
result: empty result in 'Result' view
The text was updated successfully, but these errors were encountered: