Ad Widget

Collapse

New to Zabbix, have a complex task to accomplish

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • StevenBush
    Junior Member
    • Apr 2014
    • 2

    #1

    New to Zabbix, have a complex task to accomplish

    I'm new to Zabbix, and I have a pair of tasks that I need to accomplish.

    As part of the solutions deployed on my company's environments, we have proprietary multi-server deployments. So for a given deployment of a solution, you may have a processing tier, a presentation tier, and a database tier, etc. There is an application (metadata server) on one of the servers that knows the details of all the components of a given deployment.

    I have code that can connect to the metadata server and build a connection map of all the connections that are part of that deployment. I have another set of code that will then test all the connections associated with a given deployment and return their individual state (ok, not ok, etc).

    What I need to do: First discover the connection components, then monitor each connection. Ideally the connections for a given deployment would be monitored as a groups (i.e. I'd call one command and it would return the status of all the connections for that deployment). Both the monitoring and the discovery actions need to be accomplished from the same box, but that box doesn't have to be the same box as the metadata server.

    How would this be best accomplished?
  • steveboyson
    Senior Member
    • Jul 2013
    • 582

    #2
    Don't want to be offensive, but what about hiring a Zabbix consultant?

    Comment

    • tatapoum
      Senior Member
      • Jan 2014
      • 185

      #3
      You need to use Low-Level Discovery (https://www.zabbix.com/documentation...evel_discovery). See the end of the section.

      Your discovery script should accept a group name as an argument and display a JSON-formatted output like this :
      Code:
      {
        "data":[
        
        { "{#CONNECTION}":"foo"},
        { "{#CONNECTION}":"bar"}
        ]
      }
      Create a discovery rule associated to your metadata server for each group of connections. The type should be "external script" and point to your discovery script, with the group name as an argument.
      Create an item prototype in each rule, with the "external script" type and set :
      - its name as "Connection {#CONNECTION}"
      - its key as "connection[{#CONNECTION}]
      - the script as queryscript["{#CONNECTION}"]

      This will automatically create a item for each connection and query its value using the "queryscript" script.

      Comment

      • StevenBush
        Junior Member
        • Apr 2014
        • 2

        #4
        Thanks tatapoum, that worked perfectly.

        Comment

        Working...