Checking Status of Riverbed

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
hudbaylicensing
Posts: 27
Joined: Fri Jul 13, 2012 11:48 am

Checking Status of Riverbed

Post by hudbaylicensing »

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
You do not have the required permissions to view the files attached to this post.
User avatar
nscott
Posts: 1040
Joined: Wed May 11, 2011 8:54 am

Re: Checking Status of Riverbed

Post by nscott »

Its giving that error because this code, starting at line 186:

Code: Select all

$rbtsh_system_model =
    grab_snmp_value($oid_rbtsh .
	    		      $oid_rbtsh_system .
	    		      $oid_rbtsh_system_model);
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.
Nicholas Scott
Former Nagios employee
hudbaylicensing
Posts: 27
Joined: Fri Jul 13, 2012 11:48 am

Re: Checking Status of Riverbed

Post by hudbaylicensing »

Thanks for the quick reply.

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);
    }
To

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);
    }
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
Locked