User Tools

Site Tools


сервис_zabbix

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
сервис_zabbix [2025/05/16 14:55]
val [Настройка уведомлений о событиях]
сервис_zabbix [2025/05/23 08:58] (current)
val [Элементы типа trapper]
Line 151: Line 151:
 # cat /​etc/​zabbix/​zabbix_proxy.conf # cat /​etc/​zabbix/​zabbix_proxy.conf
 </​code><​code>​ </​code><​code>​
-...+#...
 Hostname=gate Hostname=gate
-ConfigFrequency=60+ 
 +#v6 
 +#ConfigFrequency=60 
 +#v7 
 +#​ProxyConfigFrequency=60 
 +  ​
 Server=server Server=server
 DBName=/​var/​lib/​zabbix/​zabbix.db DBName=/​var/​lib/​zabbix/​zabbix.db
Line 619: Line 624:
 </​code><​code>​ </​code><​code>​
 #!/bin/sh #!/bin/sh
 +
 +### iperf ###
 +MY_RES=$(iperf -c gate.isp.un -t 5 -R -f b -y c)
 +MY_DOWNLOAD=$(echo $MY_RES | cut -d','​ -f9)
 +MY_RES=$(iperf -c gate.isp.un -t 5 -f b -y c)
 +MY_UPLOAD=$(echo $MY_RES | cut -d','​ -f9)
  
 ### speedtest-cli ### result bits/s ### speedtest-cli ### result bits/s
-MY_RES=`speedtest-cli --csv` +#MY_RES=`speedtest-cli --csv` 
-MY_DOWNLOAD=`echo $MY_RES | cut -d','​ -f7` +#MY_DOWNLOAD=`echo $MY_RES | cut -d','​ -f7` 
-MY_UPLOAD=`echo $MY_RES | cut -d','​ -f8`+#MY_UPLOAD=`echo $MY_RES | cut -d','​ -f8`
  
 ### speedtest ### result Bytes/s (use preprocess Custom multiplier) ### speedtest ### result Bytes/s (use preprocess Custom multiplier)
 #​MY_RES=`speedtest -f csv` #​MY_RES=`speedtest -f csv`
 #​MY_DOWNLOAD=`echo $MY_RES | cut -d','​ -f6` #​MY_DOWNLOAD=`echo $MY_RES | cut -d','​ -f6`
-#Y_UPLOAD=`echo $MY_RES | cut -d','​ -f7`+#MY_UPLOAD=`echo $MY_RES | cut -d','​ -f7`
  
 zabbix_sender -z 127.0.0.1 -p 10051 -s server.corpX.un -k speedtest.download -o $MY_DOWNLOAD zabbix_sender -z 127.0.0.1 -p 10051 -s server.corpX.un -k speedtest.download -o $MY_DOWNLOAD
Line 1066: Line 1077:
  
 <​code>​ <​code>​
-Configuration->​Discovery+Data collection/Configuration->​Discovery
 Discovery rules Discovery rules
   Name: Local network ​   или ​   Cisco Router Discovery   Name: Local network ​   или ​   Cisco Router Discovery
Line 1083: Line 1094:
   Enabled: yes   Enabled: yes
  
-Configuration->​Actions+Alert/Configuration->​Actions
   Event source: Discovery   Event source: Discovery
-    Name: Action add snmp device to zabbix+    Name: Action add Cisco device to zabbix
     Conditions: ​     Conditions: ​
       Received value: like или contains router       Received value: like или contains router
Line 1097: Line 1108:
              4.XX Template Module Interfaces Simple SNMPv2              4.XX Template Module Interfaces Simple SNMPv2
              5.XX Template Net Cisco IOS SNMP       !!! Уменьшить период Network interfaces discovery !!!              5.XX Template Net Cisco IOS SNMP       !!! Уменьшить период Network interfaces discovery !!!
-             6.XX Cisco IOS by SNMP+        ​6.XX 7.XX Cisco IOS by SNMP
       Set host inventory mode: Automatic       Set host inventory mode: Automatic
     Add     Add
Line 1367: Line 1378:
  
   * [[https://​www.zabbix.com/​forum/​zabbix-troubleshooting-and-problems/​36900-api-key-lifetime|api key lifetime]]   * [[https://​www.zabbix.com/​forum/​zabbix-troubleshooting-and-problems/​36900-api-key-lifetime|api key lifetime]]
 +  * Для и до 6-й версии "​user":​ "​Admin",​
 <​code>​ <​code>​
 server:~# apt install curl server:~# apt install curl
Line 1376: Line 1387:
    "​method":​ "​user.login",​    "​method":​ "​user.login",​
    "​params":​ {    "​params":​ {
-      "user": "​Admin",​+      "username": "​Admin",​
       "​password":​ "​zabbix"​       "​password":​ "​zabbix"​
    },    },
Line 1510: Line 1521:
 } " http://​127.0.0.1/​zabbix/​api_jsonrpc.php } " http://​127.0.0.1/​zabbix/​api_jsonrpc.php
 </​code><​code>​ </​code><​code>​
-server.corp1.un:​~#​ /​root/​zab_set_map_name.sh 2 "ISP1"+server.corp1.un:​~#​ /​root/​zab_set_map_name.sh 2 "ISP 1"
 </​code>​ </​code>​
сервис_zabbix.1747396549.txt.gz · Last modified: 2025/05/16 14:55 by val