Ad Widget

Collapse

zabbix_sender problem

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Nikolaicheg
    Senior Member
    • Feb 2009
    • 111

    #1

    zabbix_sender problem

    Hello there!
    I'm trying to setup zabbix-server with snmptrapd. It is all ok, but zabbix_sender cant work without hostname parameter.
    Code:
    root@srv-cmon:~# /usr/bin/zabbix_sender --zabbix-server 127.0.0.1 --port 10051 -I 192.168.100.23 --key snmptraps --value "SNMPv2-SMI::enterprises.8886.6.1.1.1.1.0 = STRING: "ROS_3.8.1069.ISCOM2016.70.20080704"" -vvv
    zabbix_sender [16918]: Warning: 'Hostname' parameter required
    The server should capture traps from different equipment and i cant know all hostnames of equipment.
    Searched this forum, but didnt find any solution of this problem.
  • Calimero
    Senior Member
    • Nov 2006
    • 481

    #2
    Err... How do you expect zabbix_server to know what host the item belongs to ?

    Comment

    • Nikolaicheg
      Senior Member
      • Feb 2009
      • 111

      #3
      by the source address
      zabbix_sender -p 10051 -z localhost -I _IP_HERE_ --key bla-bla-bla

      Comment

      • MrKen
        Senior Member
        • Oct 2008
        • 652

        #4
        Originally posted by Nikolaicheg

        ..... but zabbix_sender cant work without hostname parameter.
        That's correct!

        Where do you get the ' I ' parameter from? For the hostname you need parameter -s

        Zabbix Manual 1.4 Page 69, and Zabbix Manual 1.6 Page 81, both say:

        shell> ./zabbix_sender –z zabbix –p 10051 –s LinuxDB3 –k db.connections –o
        43

        So, if you put something like "-s DefaultTrapper" for example, then ALL traps will go to the DefaultTrapper host.

        If you want to send traps to the correct host, try this link: http://pierky.wordpress.com/2009/01/...he-right-host/

        but try the DefaultTrapper first, then you'll know that it works.

        Hope that helps.

        MrKen
        Disclaimer: All of the above is pure speculation.

        Comment

        • Nikolaicheg
          Senior Member
          • Feb 2009
          • 111

          #5
          hehe
          i writen the same script, buit on perl
          idea is to find hostname by ip from sql database.
          just modified original sendtrap.pl from wiki

          Comment

          • MrKen
            Senior Member
            • Oct 2008
            • 652

            #6
            Wow, 4 smilies!!!

            I guess that means all is now okay.
            Disclaimer: All of the above is pure speculation.

            Comment

            • Calimero
              Senior Member
              • Nov 2006
              • 481

              #7
              "zabbix_sender -s $(hostname -s) ..." anyone ?

              That's one of the reasons we have the zabbix hostname matching the system hostname over here.

              Be careful, until v1.6.2 (don't know regarding pre-1.6.3) hostname is case sensitive and if the case of the reported hostname and the hostname in DB don't match, zabbix_server will discard values.

              Comment

              • Nikolaicheg
                Senior Member
                • Feb 2009
                • 111

                #8
                i dont need the system name of current pc!
                i need the hostname of switches, routers, etc... who send traps.
                see attached file.
                Attached Files

                Comment

                • Calimero
                  Senior Member
                  • Nov 2006
                  • 481

                  #9
                  OK ! My bad !

                  Comment

                  Working...