-
-
Notifications
You must be signed in to change notification settings - Fork 9
Monitoring with zabbix
Steps:
- get the data out of Assimbly using the REST service
- create the input file for zabbix_sender executable
- create zabbix items and triggers for your data
Create a REST client in any language you want
Get an initial token by calling this URL and store the parameter XSRF-TOKEN it in a cookie named X-XSRF-TOKEN
GET http://your_assimbly_server:assimbly_port/api/account
Post the login form data to (make sure you re-use your cookie data from the previous step)
POST http://your_assimbly_server:assimbly_port/api/authentication
Retrieve all flows from the assimbly instance
GET http://your_assimbly_server:assimbly_port/api/flows?page=0&size=250&sort=name,asc
Loop through the retrieved JSON with flowdata and GET their stats.
Use these parameters from each object for the stats request:
<object>.gatewayId => <Gateway ID>
<object>.id => <Flow ID>
GET http://your_assimbly_server:assimbly_port/api/connector/<Gateway ID>/flow/stats/<Flow ID>
Save the retrieved data in a textfile, values are separated by a <space>
hostname zabbixkeyname unixtimestamp value
for example:
ASSIMBLYSERVER01 flow.maxprocessingtime[flow_name_from_a_to_b] 1600947605 188
ASSIMBLYSERVER01 flow.lastprocessingtime[flow_name_from_a_to_b] 1600947605 31
ASSIMBLYSERVER01 flow.meanprocessingtime[flow_name_from_a_to_b] 1600947605 54
ASSIMBLYSERVER01 flow.lastexchangefailureexchangeid[flow_name_from_a_to_b] 1600947605 0
ASSIMBLYSERVER01 flow.firstexchangefailuretimestamp[flow_name_from_a_to_b] 1600947605 0
ASSIMBLYSERVER01 flow.firstexchangecompletedexchangeid[flow_name_from_a_to_b] 1600947605 ID-1221
ASSIMBLYSERVER01 flow.lastexchangecompletedtimestamp[flow_name_from_a_to_b] 1600947605 2020-09-24T12:13:49
ASSIMBLYSERVER01 flow.exchangescompleted[flow_name_from_a_to_b] 1600947605 9
This file can be sent to Zabbix using the following command:
zabbix_sender.exe -vv -c zabbix_agentd.win.conf -T -i zabbix_data_file.txt