Ad Widget

Collapse

Matrix or Scalar Values in Zabbix

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dagee
    Junior Member
    • Feb 2014
    • 4

    #1

    Matrix or Scalar Values in Zabbix

    Hi there,
    I love zabbix, and i learn alot about scripting in the moment :-)
    esp. because i write a monitoring-script for Open Xchange-Servers, which have only support for munin.

    Nevermind! I WANT ZABBIX! :-)

    Ok here is the Problem:
    I want to visualise the Number of Sessions. The Tool of OX only gives the Number per Workers in a scalar format like [0, 0, 2, 4, 0, 6, 0]
    it would be great to end up with a graph with a line per Worker.

    is this clear?

    I know i could get the sum and drw this, but i loose the info per Worker

    does someone know how to script this properly for zabbix?

    Are there Open Xchange Users here around working with a similar script for zabbix?

    Of course i will give my script for all when its done :-)
    Lots of variables to monitor :-)
  • steveboyson
    Senior Member
    • Jul 2013
    • 582

    #2
    Is the number of workers constant e.g. are there 7 workers everytime?

    I would write a custom LLD rule which has to return a JSON output consisting of all workers by "ID":

    Code:
    {
            "data":[
    
            {               "{#INDEX}":"0", "{#NAME}":"Worker 1"},
            {               "{#INDEX}":"1", "{#NAME}":"Worker 2"}        ]
    }
    {#INDEX} is the index into your array, {#NAME} is the name you choose for your worker.

    Then, create a script and hook it in via "UserParameter=" setting in zabbix_agentd.conf:
    Code:
    UserParameter=getOXWorkerSession[*]=yourScript $1
    <yourscript> would return the n-th value of your array as given on the command line.

    Finally create item prototypes with "{#INDEX}" as part of the key parameter
    Code:
    key: getOXWorkerSession[{#INDEX}]

    Comment

    Working...