Page tree

SAYMON документация

Skip to end of metadata
Go to start of metadata

It is possible to connect to Zabbix servers and get information about monitoring hosts with several easy steps.


1. Check connection from the server of the system to Zabbix server

To check availability of Zabbix API please run the following command in the terminal of the system, replacing  http://192.168.1.215 to your Zabbix installation file address api_jsonrpc.php:

curl -H "Content-Type: application/json" -X POST -d '{"jsonrpc":"2.0","method":"apiinfo.version","id":1,"auth":null,"params":{}}' http://192.168.1.215/zabbix/api_jsonrpc.php

and expect Zabbix to answer with a message like this:

{"jsonrpc":"2.0","result":"3.2.1","id":1}


2. Add a user to Zabbix

Add the user to Zabbix with the read access for the hosts you would like to import. These login and password are required to connect to Zabbix server on the 4th step.


3. Create an object for import

Create the object you would like to import data to on the server of the system. Find its id in Parameters section - we will need it on the next step.


4. Enable import on the server of the system

Open /etc/saymon/saymon-server.conf server configuration file and add the following block:

"zabbix" : [{
    "url" : "http://192.168.1.215/zabbix/api_jsonrpc.php",
    "user" : "saymon",
    "password" : "saymon_user_password",
    "parent_id" : "58b586d5c3a2f96642e25537"
}]

where:

  • url - file address  api_jsonrpc.php of your Zabbix installation you checked on the 1st step, e.g.  http://192.168.1.215/zabbix/api_jsonrpc.php;
  • user - Zabbix user login you added on the 2nd step;
  • password - Zabbix user password you added on the 2nd step;
  • parent_id - id of the object you created on the 3rd step.

To add another one Zabbix installation you would like to import data from just add another one block with connection parameters as follows:

"zabbix" : [
    {
    "url" : "http://192.168.1.215/zabbix/api_jsonrpc.php",
    "user" : "saymon",
    "password" : "saymon_user_password",
    "parent_id" : "58b586d5c3a2f96642e12345"
    },
    {
    "url" : "http://192.168.1.180:8020/zabbix/api_jsonrpc.php",
    "user" : "saymon",
    "password" : "saymon_user_password",
    "parent_id" : "58b586d5c3a2f966427abcde"
    }
]


5. Apply settings

To apply connection settings you will need to restart the server:

sudo service saymon-server restart


Update interval of the data

By default, the data on the server is updated every 2 minutes.

To change the update interval, open the   /etc/saymon/saymon-server.conf configuration file and add the  polling_period parameter with the value of the update interval (in milliseconds) to it. For example:

"zabbix" : [{
    "url" : "http://192.168.1.215/zabbix/api_jsonrpc.php",
    "user" : "saymon",
    "password" : "saymon_user_password",
    "parent_id" : "58b586d5c3a2f96642e25537",
    "polling_period": 30000
}]

To apply the settings, you will need to restart the server system.


  • No labels