Ad Widget

Collapse

Help with zabbix_sender and hostname

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • stefstef
    Junior Member
    • Mar 2009
    • 15

    #1

    Help with zabbix_sender and hostname

    Hi

    I'm trying to implement a script that calls zabbix_sender but I always get the same error when I run the zabbix_sender:

    Warning: 'Hostname' parameter required

    The command line is as follows:
    zabbix_sender.exe -z zabbix-server -p 10051 -s zabbix-client -k KEY -o 5.5 -v

    I'm running zabbix 1.6.6. What am I doing wrong?

    Stebbi
  • stefstef
    Junior Member
    • Mar 2009
    • 15

    #2
    Well, I came up with a solution I'm not all to happy with, but it works. I substituted the -z and -p switches with the -c switch, but I found that I had to define the config file and hostname parameters right after the switch, with no space in between. Like:

    zabbix_sender.exe -czabbix_agentd.conf -szabbix-client -k KEY -o 5.5 -v

    Comment

    • dagun
      Member
      • Sep 2009
      • 71

      #3
      Originally posted by stefstef
      Hi

      I'm trying to implement a script that calls zabbix_sender but I always get the same error when I run the zabbix_sender:

      Warning: 'Hostname' parameter required

      The command line is as follows:
      zabbix_sender.exe -z zabbix-server -p 10051 -s zabbix-client -k KEY -o 5.5 -v

      I'm running zabbix 1.6.6. What am I doing wrong?

      Stebbi
      Hi guy.


      I know how to use the "zabbix_sender", you can try it follow me .
      zabbix_sender -z IP_zabbix_server -s hostname -k KEY -o key_value
      For example:
      zabbix_sender -z 192.168.2.140 -s szg -k hrfw.cpu -o 80
      Specially, I will say that "szg" is the PC's name that you had defined in the front-end. Do you understand me???
      The item type must "zabbix trapper"

      Comment

      • stefstef
        Junior Member
        • Mar 2009
        • 15

        #4
        Yep, that's what I tried to begin with. I then found that I couldn't put a space between the -z switch and the server name and the -s switch and the hostname. I fixed it as I stated above your reply. It was messy, but it worked. When I had the spaces the log would know the name with a space in front, like [ server].

        Stebbi

        Comment

        • dagun
          Member
          • Sep 2009
          • 71

          #5
          Hi

          Originally posted by stefstef
          Yep, that's what I tried to begin with. I then found that I couldn't put a space between the -z switch and the server name and the -s switch and the hostname. I fixed it as I stated above your reply. It was messy, but it worked. When I had the spaces the log would know the name with a space in front, like [ server].

          Stebbi
          I don't understand you.You can give me your example. I use zabbix for one year.I will help you.

          Comment

          • stefstef
            Junior Member
            • Mar 2009
            • 15

            #6
            Thanks for your offer dagun, but like I've been trying to say in my past posts, I've found a solution (messy, but it works).

            Stebbi

            Comment

            Working...