Hi,
I have a web app running in several places. I'd like to monitor and graph my custom data. I can request my API and return JSON or Key Value data as part of https check.
How do I get this simple data into Zabbix? I would rather not have to use the UserParameter and modify the agent. Being able to graph the data and compare it to other hosts is the desired goal.
Endpoint 1: https://host/api/state?mode=json
{
"build": 20170817,
"transcoders": 0,
"mem-max": 7589068800,
"state": "OK",
"up": 3,
"bytes-out": 546424224,
"mem-free": 365000664,
"bytes-in": 5000,
"version": "6.0.1",
"down": 0,
"connections": 2
}
Endpoint 2: https://host/api/state?mode=zabbix
myapp.build=20170817
myapp.transcoders=0
myapp.mem-max=7589068800
myapp.state=OK
myapp.up=3
myapp.bytes-out=546424224
myapp.mem-free=371305968
myapp.bytes-in=5000
myapp.version=6.0.1
myapp.down=0
myapp.connections=2
And of course if would like to check the state for not "OK" and send an alert.. or send an alert if I don't get a 200 response code.
This seems really basic and highly valuable.. But my zabbix expert and I are struggling with the best way. Any pointers appreciated!
I have a web app running in several places. I'd like to monitor and graph my custom data. I can request my API and return JSON or Key Value data as part of https check.
How do I get this simple data into Zabbix? I would rather not have to use the UserParameter and modify the agent. Being able to graph the data and compare it to other hosts is the desired goal.
Endpoint 1: https://host/api/state?mode=json
{
"build": 20170817,
"transcoders": 0,
"mem-max": 7589068800,
"state": "OK",
"up": 3,
"bytes-out": 546424224,
"mem-free": 365000664,
"bytes-in": 5000,
"version": "6.0.1",
"down": 0,
"connections": 2
}
Endpoint 2: https://host/api/state?mode=zabbix
myapp.build=20170817
myapp.transcoders=0
myapp.mem-max=7589068800
myapp.state=OK
myapp.up=3
myapp.bytes-out=546424224
myapp.mem-free=371305968
myapp.bytes-in=5000
myapp.version=6.0.1
myapp.down=0
myapp.connections=2
And of course if would like to check the state for not "OK" and send an alert.. or send an alert if I don't get a 200 response code.
This seems really basic and highly valuable.. But my zabbix expert and I are struggling with the best way. Any pointers appreciated!
Comment