Ad Widget

Collapse

automatic actions on multiple hosts?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • MadOtis
    Junior Member
    • May 2014
    • 5

    #1

    automatic actions on multiple hosts?

    Hello,

    I'm trying to expand Zabbix' capacity by performing some automation tasks on a few monitored servers. My scenario is like this:

    4 Jenkins slaves, all monitoried via Zabbix agent. All 4 servers are configured the same via Puppet, so home folders, etc. are all in the same location on each Jenkins slave. There is one folder on each of the slaves that share a single NFS mount, and is used for (yes, I know, but I didn't design those systems) storage of maven's .m2/repository local caches.

    What I'm trying to achieve is when that NFS mount gets below 20% free space, have Zabbix execute an action on each of those 4 Jenkins slaves, such as removing the contents of each .m2/repository local cache to free up space on the NFS mount.

    I have the action created, and the conditions being "free space less than 20% on..." for each server (using "or"), so the action can get triggered by either of the 4 servers reporting a low space trigger.

    My question is on the "Operations" tab. I set up 4 operations like the screenshots attached. The commands section uses an URL to bring the slave offline, sleeps 600 seconds (to let any jobs finish), rm's all the contents of the repository cache, then uses an URL to bring the slave back online. Is it acceptable to put 4 commands into a single commands textbox for the action? Or, do I need to create an action for each of the commands, on each of the servers?

    I'm asking because the action doesn't seem to be triggering when I expect it to, and I'm not sure if it's due to how the action is configured, or something is failing in the action itself.

    Regardless, I'm not seeing slaves taken offline, nor any space cleaned up on the slaves or the NFS mount.

    Anyone have any suggestions or recommendations?
    Attached Files
    Last edited by MadOtis; 23-09-2014, 22:13. Reason: removed embedded images in favor of attached
Working...