Found this script <check_snmp_riverbed_steelhead> online that checks the status of Riverbed Steelhead Devices. It works great for all of our older models of the steelhead, but no longer works for our new Steelhead EX that we we recently bought. I decided I was going to try to figure this out. I made a copy of the script and added an EX at the end of the file. I noticed that the MIB numbers were different on the new steelheads - old was .1.3.6.1.4.1.17163.1.1 and the new one was .1.3.6.1.4.1.17163.1.51.
So I changed this in the new script I created, and ran the command ./check_snmp_riverbed_steelheadEX -H <MachineFQDN> -C 'public' and received a sort of correct response:
No information returned from SNMP|system_model=EX760 (EX760H), system_serial=DA3NV000A6CAF, health_status=Healthy, service_status=running, system_version=rbt_ex 1.0.2a #223_32 2012-05-15 01:47:46 x86_64 root@palermo0:svn://svn/build/branches/malta-ex_223_fix_branch
So it is displaying System Model, Serial Number, health Status, Service Status, System version correctly, but it is returning No information returned from SNMP at the beginning - which causes Nagios to report it as an error on the web interface.
Wondering if anyone could help out with this, I really know nothing about perl...
I have attached the original script as well as the one I have editted.
Thanks,
Marc
Checking Status of Riverbed
-
hudbaylicensing
- Posts: 27
- Joined: Fri Jul 13, 2012 11:48 am
Checking Status of Riverbed
You do not have the required permissions to view the files attached to this post.
Re: Checking Status of Riverbed
Its giving that error because this code, starting at line 186:
Is not return a value, so when rbtsh_system_model get tested later, on line 231, its sets the return string to "No information returned from SNMP".
I would make sure that the values being passed to the above get_snmp_value call are correct.
Code: Select all
$rbtsh_system_model =
grab_snmp_value($oid_rbtsh .
$oid_rbtsh_system .
$oid_rbtsh_system_model);
I would make sure that the values being passed to the above get_snmp_value call are correct.
Nicholas Scott
Former Nagios employee
Former Nagios employee
-
hudbaylicensing
- Posts: 27
- Joined: Fri Jul 13, 2012 11:48 am
Re: Checking Status of Riverbed
Thanks for the quick reply.
I had a dev friend take alook and they changed one operator and it now works.
To
From what my friend explained was that before using == was only looking for a numeric value to be returned and by changing it to eq had it expect a alphanumeric result and the model is EX760 as opposed to older version which used 1520 or 2020.
Thanks for your help.
Marc
I had a dev friend take alook and they changed one operator and it now works.
Code: Select all
# Build the return string
if ($rbtsh_system_model = "") {
$returnstr =
"No information returned from SNMP";
status(2); # Critical
} else {
$returnstr =
("Steelhead " .
$rbtsh_system_model .
": " .
$rbtsh_status_healthstr .
", optimisation service: " .
$rbtsh_status_servicestr);
}
Code: Select all
# Build the return string
if ($rbtsh_system_model eq "") {
$returnstr =
"No information returned from SNMP";
status(2); # Critical
} else {
$returnstr =
("Steelhead " .
$rbtsh_system_model .
": " .
$rbtsh_status_healthstr .
", optimisation service: " .
$rbtsh_status_servicestr);
}
Thanks for your help.
Marc