Ad Widget

Collapse

Zabbix agent userparameter and hostnameitem

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Beginner
    Junior Member
    • Feb 2017
    • 10

    #1

    Zabbix agent userparameter and hostnameitem

    Hi,

    I've been playing with Zabbix alot lately. Now i'm working with external scripts for my zabbix agent.

    My script works with Zabbix trapper items. My server does not receive this data. I'm sure this script is working fine and the userparameter is set correctly.
    Now i've been trying to find a solution. After alot of fixing i did find one unusual thing happening.

    My agent does make use of HostnameItem to retrieve the fqdn of my machine.
    Whenever i remove the hostnameitem and set a hostname hardcoded, my data does get received by the server.

    The way i get the FQDN is just by hostnameitem=system.hostname , while hostname is uncommented. Why does hostnameitem interfere with userparameters?

    Thanks in advance.
  • nobodysu
    Member
    • Sep 2016
    • 84

    #2
    Most likely your items looks like:
    Code:
    - item[1] 123
    When using hostnameitem zabbix agent does not evaluate '-'. This behavior will not be fixed.

    My suggestion is to provide the script with {HOST.HOST} and then form items like:
    Code:
    "Example host" item[1] 123
    Last edited by nobodysu; 09-03-2017, 15:03.

    Comment

    • Beginner
      Junior Member
      • Feb 2017
      • 10

      #3
      Originally posted by nobodysu
      Most likely your items looks like:
      Code:
      - item[1] 123
      When using hostnameitem zabbix agent does not evaluate '-'. This behavior will not be fixed.

      My suggestion is to provide the script with {HOST.HOST} and then form items like:
      Code:
      "Example host" item[1] 123
      Hey, thanks alot for answering. This explains why it won't work.
      I will try your solution soon3

      Thanks alot!

      Comment

      Working...