Ad Widget

Collapse

Monitor directory names over multiple servers

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • fallwor
    Junior Member
    • Mar 2013
    • 19

    #1

    Monitor directory names over multiple servers

    Hey,

    On our servers (Ubuntu14.04) we have a collection of directories. Each directory has a hash in the name which defines the version of the directory contents. An automated script updates the hash and contents once in a while when a new version is pushed. However, sometimes the push does not execute on every server.

    I need Zabbix to monitor the hashes of these folders over all servers and generate an alarm when a server it's hash is behind.

    What would be the best practice to compare the directory names over servers?
  • jamesNJ
    Senior Member
    • Jun 2015
    • 103

    #2
    If the hash values are all the same and can be discerned from some authoritative source, you could create a user parameter or an ssh test which invokes a find (or other script) to check all directories match or fail that pattern.

    Either the host script would need to be able to find this hash value on its own, or you could create a user macro for the hash, and then update the zabbix database periodically to keep the hash up to date.

    Comment

    • fallwor
      Junior Member
      • Mar 2013
      • 19

      #3
      Originally posted by jamesNJ
      If the hash values are all the same and can be discerned from some authoritative source, you could create a user parameter or an ssh test which invokes a find (or other script) to check all directories match or fail that pattern.

      Either the host script would need to be able to find this hash value on its own, or you could create a user macro for the hash, and then update the zabbix database periodically to keep the hash up to date.
      Thanks for your response.
      I was hoping Zabbix could do it by itself. I managed to get the hash from an authoritative source into zabbix and I managed to get the hash of each host into zabbix. What I would need is zabbix to compare the hashes and give an alarm if one doesn't match. Sadly I have been unable to find how to compare 2 (or more) items in a trigger.

      Putting it in a macro would be impractical. The hash can change several times a day, and we're monitoring over 20 hashes. Failing to add a hash to a macro would result in alarms.

      Is there a way to pass the result of an item (of another host) to a userparameter?

      Comment

      • jamesNJ
        Senior Member
        • Jun 2015
        • 103

        #4
        >> Is there a way to pass the result of an item (of another host) to a user parameter?

        I was kind of thinking the same way but could not find any way to do this. You can create items with macros but I don't think items with embedded items are possible. I haven't tried that, and the docs don't seem to imply it is possible

        Perhaps a user parameter that invokes a script where the client machine is responsible for pulling down the list of hashes to itself for the check?

        Comment

        Working...