Ad Widget

Collapse

Check SNMP access to MIB ??

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • benito103e
    Junior Member
    • Jun 2010
    • 24

    #1

    Check SNMP access to MIB ??

    Hi everybody,

    I'm monitoring my ESX with SNMP.

    The problem is that the service Dell open manage can switch OFF :
    - I would have access to the snmp agent on the ESX (simple check)
    - I would have access to the VMWARE MIB
    - But not to the DELL MIB

    My idea was to get back a useless data from the DELL MIB
    and setup a trigger with *****.nodata(45)

    But if the item switch to "not supported" the trigger doesn't work !

    have you some idea??
  • ruswold
    Senior Member
    • Mar 2010
    • 210

    #2
    Originally posted by benito103e
    Hi everybody,

    I'm monitoring my ESX with SNMP.

    The problem is that the service Dell open manage can switch OFF :
    - I would have access to the snmp agent on the ESX (simple check)
    - I would have access to the VMWARE MIB
    - But not to the DELL MIB

    My idea was to get back a useless data from the DELL MIB
    and setup a trigger with *****.nodata(45)

    But if the item switch to "not supported" the trigger doesn't work !

    have you some idea??
    Possible your oids from DELL MIB is wrong, snmp check cannot find OID or data type of item is incorrect (like get string and data type is integer) .
    Try exec from zabbix snmpget -v1 -c public IP_address OID_From_MIB to see result and error if it's happend. And see zabbix_server.log.

    Comment

    • benito103e
      Junior Member
      • Jun 2010
      • 24

      #3
      Originally posted by ruswold
      Possible your oids from DELL MIB is wrong, snmp check cannot find OID or data type of item is incorrect (like get string and data type is integer) .
      Try exec from zabbix snmpget -v1 -c public IP_address OID_From_MIB to see result and error if it's happend. And see zabbix_server.log.
      Thanks for your answered, I think I was not very clear... Sorry for my english

      - I can get the data from this OID
      - But when the open manage agent fall or bug :
      --> I can get data from VMWARE OID
      --> But not from DELL OID

      And thus, the item (wich get DELL-OID-DATA become "not suported") and the trigger don't say me there is a problem

      Comment

      • ruswold
        Senior Member
        • Mar 2010
        • 210

        #4
        Originally posted by benito103e
        Thanks for your answered, I think I was not very clear... Sorry for my english

        - I can get the data from this OID
        - But when the open manage agent fall or bug :
        --> I can get data from VMWARE OID
        --> But not from DELL OID

        And thus, the item (wich get DELL-OID-DATA become "not suported") and the trigger don't say me there is a problem
        And my English is not very good, byt now i undestand you. I think you may use external check.
        1) make script ckeck_Dellmib.pl like this:

        Code:
        #!/usr/bin/perl
        use strict;
        use warnings;
        use SNMP;
        
        # requires a hostname and a community string as its arguments
        my $session = new SNMP::Session(DestHost => $ARGV[0], Community => $ARGV[1],UseSprintValue => 1, Version => 2 );
        if(!defined $session){
            print "-1";
            exit 1;
            }
        
        
        my $request="$ARGV[2]";
        my $result = $session->get($request);
        
        if ($session->{ErrorStr}){
            print "-1";
            }
        else{
            print $result;
            }
        exit 0;
        Usage in shell perl ckeck_Dellmib.pl HOST Community OID
        example perl ckeck_Dellmib.pl 10.10.0.5 public .1.3.6.1.2.1.1.3.0
        It's return -1 if open manage agent fall or bug and return result of this mib if can access

        2) make item
        type: external check
        key: ckeck_Dellmib.pl[Community OID]
        value type: Float
        3) make trigger {HOST:ckeck_Dellmib.pl[Community OID].last(0)}<0 and make trigger depend of trigger ping. If you don't do it, you receive 2 messages ping down and ckeck_Dellmib error if host down. If you make dependences you receive only 1 message - ping down.
        4) don't set Units, because if use set like s (second) value -1s zabbix don't undestand and item became "not supported".

        Comment

        • benito103e
          Junior Member
          • Jun 2010
          • 24

          #5
          Wahh O_O !!

          Thank you very much !

          I was going to make a script, but yours is very good !

          Thanks !

          Comment

          • benito103e
            Junior Member
            • Jun 2010
            • 24

            #6
            I just prefer to make a trigger :

            check_MIB_OID.pl[public OID].str("Dell Inc.")}=0

            because I can receive data like "No Such Object avail ..."

            Thanks.

            Comment

            Working...