Ad Widget

Collapse

remote command in template

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • SLMitch
    Member
    • May 2006
    • 39

    #1

    remote command in template

    In my template UNIX, i decide to make a remote_command where /etc/passwd file is changed.

    I use : {Unix:vfs.file.cksum[/etc/passwd].diff(0)}>0 for the item

    I wanted have :
    {HOSTNAME}:"diff -uwB /etc/passwd- /etc/passwd |mail [email protected]" has remote command, in order to have the real difference between old file and new file.

    However, trigger is identify by an hostname, and i can't use a generic soluce like this.

    There are a soluce ? (I can't create 200 trigger and 200 remote_command, too long and not flexible)
  • adam.vollrath
    Member
    • Apr 2006
    • 31

    #2
    There's a way to create custom items in zabbix_agentd.conf on each host. This may be the easiest way to create many different items. See the example mysql items in zabbix_agentd.conf

    Another idea it to 'manually' look through the zabbix SQL database, reverse-engineer it, and create a string of insert queries to add all of your items. This is tedious, time-consuming, and could be dangerous for your database (and your sanity!) but it is possible.

    Comment

    Working...