Ad Widget

Collapse

Running an external check via agent

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ecweaver
    Junior Member
    • Jul 2014
    • 2

    #1

    Running an external check via agent

    On 2.2.2, Ubuntu 12.04 LTS (Precise)...

    I have an external check to monitor that a certain file is getting updated. I want this to be run periodically on each of the hosts for which this is important.

    Did the Admin -> Scripts thing, created a script called check_foo.pl (which is the name of the actual script). "Execute On" is set to "Agent"; the "Commands" block just has /usr/lib/zabbix/externalscripts/check_foo.pl and I have made that dir and copied the file to there and set mode to executable on all desired agent-nodes.

    We have a template for this, called "Template foo check" and in it an item called "foo is active"... its key says check_foo.pl["10","/path/to/file"]

    It seems to always run on the zabbix server, and say "File foo doesn't exist" which is what the script says (and indeed the file doesn't exist on the zabbix server host), not on the agented hosts, which is what we want.

    Can someone please point me to the bit in the documentation I'm missing here? Or tell me where the disconnect is?

    Thanks
  • jvalenzani
    Member
    Zabbix Certified Specialist
    • Sep 2010
    • 53

    #2
    I think you are confusing things. External Checks ALWAYS run on Zabbix Server. If you want to execute a custom script to populate an item you need to use a User Parameter on the agent.

    Check Documentation for further info:



    Comment

    • ecweaver
      Junior Member
      • Jul 2014
      • 2

      #3
      Running an external check via agent

      Yes, thank you! So my subject line is a misnomer; it should be "running a custom script to check something via agent".

      Originally posted by jvalenzani
      I think you are confusing things. External Checks ALWAYS run on Zabbix Server. If you want to execute a custom script to populate an item you need to use a User Parameter on the agent.

      Check Documentation for further info:



      https://www.zabbix.com/documentation...userparameters
      Got it, thank you! That is exactly what I need. Much appreciated.

      Comment

      Working...