Ad Widget

Collapse

script snmp

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • fege
    Member
    • Dec 2008
    • 34

    #1

    script snmp

    I made a simple script

    Code:
    #!/bin/bash
    echo 100
    then i call

    Code:
    snmpwalk -v 1 -c public localhost .1.3.6.1.4.1.2021.1000
    result
    Code:
    UCD-SNMP-MIB::ucdavis.1000.1.1 = INTEGER: 1
    UCD-SNMP-MIB::ucdavis.1000.2.1 = STRING: "numeroprocessori"
    UCD-SNMP-MIB::ucdavis.1000.3.1 = STRING: "/bin/sh /tmp/numproc.sh"
    UCD-SNMP-MIB::ucdavis.1000.100.1 = INTEGER: 0
    UCD-SNMP-MIB::ucdavis.1000.101.1 = STRING: "10"
    UCD-SNMP-MIB::ucdavis.1000.102.1 = INTEGER: 0
    UCD-SNMP-MIB::ucdavis.1000.103.1 = ""
    I do not understand why I see 10 as a string, you need me to be a integer to make the graph
    or i can make the graph with string?
  • neoyagami
    Junior Member
    • Jan 2009
    • 13

    #2
    when you create the item , the data type can be selected (string, int, float,etc)
    in that case (int or float) you can do the graph

    cheers.

    Comment

    • fege
      Member
      • Dec 2008
      • 34

      #3
      if i select int or float zabbix tell me invalid data type, if i select text or char it is ok but i can't create a graph. Can i change data type on snmp? String to integer

      Comment

      • Alexei
        Founder, CEO
        Zabbix Certified Trainer
        Zabbix Certified SpecialistZabbix Certified Professional
        • Sep 2004
        • 5654

        #4
        Zabbix does not conver quoted string to numeric values currently. This will be supported starting from 1.6.2.
        Alexei Vladishev
        Creator of Zabbix, Product manager
        New York | Tokyo | Riga
        My Twitter

        Comment

        Working...