I think the only way to do this is with Data Manipulation, but I'm unsure.
I have exact values being returned from a RAID staus. 1, and 3 are valid "OK" values. However explicitly a 2 or anything higher than a 3 indicates a failure. Trying to figure out how to make a Threshold rule for this, or if it can even handle it has been boggling me.
Has anyone run into this before?
Trigger for specific values
Moderators: Developers, Moderators
Re: Trigger for specific values
You'd need to use RPN Expression's to return a manipulated value. I haven't used them before, but it would be something like:
Checkout : https://oss.oetiker.ch/rrdtool/tut/rpntutorial.en.html
Code: Select all
|ds:ping|,1,EQ,0,|ds:ping|,3,EQ,1,|ds:ping|,IF,IF
Cacti Developer & Release Manager
The Cacti Group
Director
BV IT Solutions Ltd
+--------------------------------------------------------------------------+
Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
The Cacti Group
Director
BV IT Solutions Ltd
+--------------------------------------------------------------------------+
Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
Re: Trigger for specific values
Good ole RPN. Thanks again netniV.netniV wrote:You'd need to use RPN Expression's to return a manipulated value. I haven't used them before, but it would be something like:Checkout : https://oss.oetiker.ch/rrdtool/tut/rpntutorial.en.htmlCode: Select all
|ds:ping|,1,EQ,0,|ds:ping|,3,EQ,1,|ds:ping|,IF,IF
Re: Trigger for specific values
If you get the expression working, post it here as I am curious how close I am lol. By my reckoning it should produce 0 (for 1), 1 (for 3), current value for 2 or 4+
Cacti Developer & Release Manager
The Cacti Group
Director
BV IT Solutions Ltd
+--------------------------------------------------------------------------+
Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
The Cacti Group
Director
BV IT Solutions Ltd
+--------------------------------------------------------------------------+
Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
Re: Trigger for specific values
I've got a non-production cage I can pull a drive out of to test and verify this works. However, I decided to simply test for 1, 3 and greater than 3 as it seemed to be the easiest method.netniV wrote:If you get the expression working, post it here as I am curious how close I am lol. By my reckoning it should produce 0 (for 1), 1 (for 3), current value for 2 or 4+
Code: Select all
|ds:hdd_status|,1,EQ,0,|ds:hdd_status|,2,EQ,1,|ds:hdd_status|,3,EQ,0,|ds:hdd_status|,3,GT,1,|ds:hdd_status|,IF,IF,IF,IF
- 1 = Good
- 2 = Bad
- 3 = Good
- > 3 = Bad
There are no return codes less than 1 and anything that is not a 1 or 3 indiciates a failure that needs eyes on inspection.
Currently a 3 is returning a 0. So that part I know to be working. However before I see a failure somewhere, I'd like to test one.
The other detail (for anyone else who stumbles upon this later) that few mention, is that data manipulation alters the data from the data source then hands it back to the "Threshold Engine" if you will, so that it only sees (for this query) a 1 or a 0. I'm only triggering the "Alert - High", on a 1. Nothing else. If you're reading top to bottom, down the threshold page, it reads counterintuitively like data manipulation comes afterwards.
Thanks again. RPN + Logic Flow is not the most intuituve without official Thold documentation anywhere, but it certainly does get results.
Who is online
Users browsing this forum: No registered users and 1 guest