Ad Widget

Collapse

External script with parameters on Zabbix Server

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Mojah
    Member
    • Apr 2010
    • 60

    #1

    External script with parameters on Zabbix Server

    Hi,

    I'm trying to do the following:
    Item for the "forward DNS" of a host
    Item for the "reverse DNS" of a host
    Trigger if they don't match.

    I thought I could create an external script that would run on the Zabbix Server (not on each individual host via the Zabbix Agent).

    I want to fire an external script, and give it an extra parameter: either the DNS name, or the IP address as configured in Zabbix Server.

    But firing an external script, doesn't allow passing it parameters that are properties of that host.

    Is there another (proper) way of doing it?

    The reason I don't prefer using the Zabbix Agent on each server, is because of configuration-management.

    Regards,
    M.
  • James Wells
    Senior Member
    • Jun 2005
    • 664

    #2
    Greetings,
    Originally posted by Mojah
    I'm trying to do the following:
    Item for the "forward DNS" of a host
    Item for the "reverse DNS" of a host
    Trigger if they don't match.
    The way I did this was with two scripts. One for forward DNS resolution which reported to one item and the second for reverse DNS resolution which reported to a second item. Then I created a "complex" trigger comparing the two values;
    {HostName:script_dns_forward.last(0)}#{HostName:sc ript_dns_reverse.last(0)}

    There are much more efficient ways to do this, but I wanted to capture the information as well as trigger on it.
    Unofficial Zabbix Developer

    Comment

    • Mojah
      Member
      • Apr 2010
      • 60

      #3
      Hi James,

      Did you do this by specifying a hostname/ip directly in your script?

      I seem to get stuck at having zabbix pass parameters to my script, so I can use 1 script that will check the forward/reverse DNS, depending on which hostname or IP is being passed as an argument.

      Regards,
      M.

      Comment

      • James Wells
        Senior Member
        • Jun 2005
        • 664

        #4
        Originally posted by Mojah
        Did you do this by specifying a hostname/ip directly in your script?
        Unless this changed recently, the Zabbix server passes the affected hostname as the argument for external checks.
        Unofficial Zabbix Developer

        Comment

        Working...