Outils pour utilisateurs

Outils du site


linux:zabbix (lu 25148 fois)

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentes Révision précédente
Prochaine révision
Révision précédente
linux:zabbix [08-07-2014 16:04]
edmc73 [Installation sur synology]
linux:zabbix [03-11-2014 11:37] (Version actuelle)
edmc73
Ligne 120: Ligne 120:
 http://blog.les-titans.com/index.php/2013/04/monitoring-de-mysql-sur-zabbix/ http://blog.les-titans.com/index.php/2013/04/monitoring-de-mysql-sur-zabbix/
  
-===== I/O Stats =====+===== I/O Disk Stats =====
  
 http://www.denniskanbier.nl/blog/monitoring/monitoring-disk-io-using-zabbix/ http://www.denniskanbier.nl/blog/monitoring/monitoring-disk-io-using-zabbix/
 +
 +http://romain.novalan.fr/wiki/Monitor_a_device_performance_on_Linux_with_Zabbix
  
 ===== Windows ===== ===== Windows =====
Ligne 144: Ligne 146:
  
 Lancez l'agent zabbix via la commande Lancez l'agent zabbix via la commande
-  /opt/zabbix/sbin/zabbix_agentd -c /opt/zabbix/etc/zabbix_agentd.conf+  /opt/zabbix/sbin/zabbix_agentd -c /opt/zabbix/conf/zabbix_agentd.conf
  
 On peut vérifier le bon fonctionnement avec ps On peut vérifier le bon fonctionnement avec ps
Ligne 154: Ligne 156:
 et le fichier de log et le fichier de log
 <code>> cat /tmp/zabbix_agentd.log  <code>> cat /tmp/zabbix_agentd.log 
- 19600:20140708:160131.502 Starting Zabbix Agent [com-nas1]. Zabbix 2.2.4 (revision 46772). + 19600:20140708:160131.502 Starting Zabbix Agent [nas3]. Zabbix 2.2.4 (revision 46772). 
- 19600:20140708:160131.503 using configuration file: /opt/zabbix/etc/zabbix_agentd.conf+ 19600:20140708:160131.503 using configuration file: /opt/zabbix/conf/zabbix_agentd.conf
  19601:20140708:160131.507 agent #0 started [collector]  19601:20140708:160131.507 agent #0 started [collector]
  19602:20140708:160131.513 agent #1 started [active checks #1]  19602:20140708:160131.513 agent #1 started [active checks #1]
Ligne 162: Ligne 164:
 </code> </code>
  
-Reste à ajouter un fichier de conf dans init comme décrit plus bas dans ce chapitre.+Pour que zabbix-agent se lance au démarrage, j'ai rajouté le fichier suivant 
 +  vi /usr/syno/etc/rc.d/S99zabbix.sh 
 +<code bash> 
 +#!/bin/sh 
 +if [ "$1" = "start" -o "$1" = "" ]; then 
 + /opt/zabbix/sbin/zabbix_agentd -c /opt/zabbix/conf/zabbix_agentd.conf 
 +fi 
 +</code> 
 +  chmod +x /usr/syno/etc/rc.d/S99zabbix.sh 
 + 
 +et voila !
  
 --- ---
Ligne 172: Ligne 184:
   Linux Nas 3.2.40 #4482 SMP Fri Apr 18 16:52:49 CST 2014 x86_64 GNU/Linux synology_bromolow_rs3412rpxs   Linux Nas 3.2.40 #4482 SMP Fri Apr 18 16:52:49 CST 2014 x86_64 GNU/Linux synology_bromolow_rs3412rpxs
  
-  wget http://www.zabbix.com/downloads/2.2.1/zabbix_agents_2.2.1.linux2_6_23.amd64.tar.gz +On range tout ça sans /opt/zabbix 
-  tar zxvf zabbix_agents_2.2.1.linux2_6_23.amd64.tar.gz+  mkdir /opt/zabbix 
 +  cd /opt/zabbix 
 +  wget http://www.zabbix.com/downloads/2.2.5/zabbix_agents_2.2.5.linux2_6_23.amd64.tar.gz 
 +  tar zxvf zabbix_agents_2.2.5.linux2_6_23.amd64.tar.gz 
 + 
 +Créer un utilisateur zabbix 
 +  echo "zabbix:x:1200:200::/opt/zabbix:/bin/false" >> /etc/passwd 
 + 
 +Modifier le fichier de config et lancé la commande 
 +  /opt/zabbix/sbin/zabbix_agentd -c /opt/zabbix/conf/zabbix_agentd.conf 
 + 
 +Vérifier le bon fonctionnement 
 +  > ps w | grep zabbix   
 +  30271 zabbix   18384 S    /opt/zabbix/sbin/zabbix_agentd -c /opt/zabbix/conf/zabbix_agentd.conf 
 +  30272 zabbix   18384 S    /opt/zabbix/sbin/zabbix_agentd: collector [idle 1 sec] 
 +  30273 zabbix   18384 S    /opt/zabbix/sbin/zabbix_agentd: active checks #1 [idle 1 sec] 
 + 
 +Ainsi que les logs 
 +  cat /tmp/zabbix_agentd.log 
 +  30271:20140901:112142.725 Starting Zabbix Agent [com-nas3]. Zabbix 2.2.5 (revision 47411). 
 +  30271:20140901:112142.725 using configuration file: /opt/zabbix/conf/zabbix_agentd.conf 
 +  30272:20140901:112142.726 agent #0 started [collector] 
 +  30273:20140901:112142.726 agent #1 started [active checks #1] 
 +  30273:20140901:112142.730 no active checks on server [172.16.30.84:10051]: host [com-nas3] not found 
 + 
 +Ici on voit l'hote "com-nas3" n'a pas été déclaré sur le serveur zabbix
  
-J'ai rangé tout ça dans /opt/zabbix, modifié le fichier de config et lancé la commande 
-  /opt/zabbix/sbin/zabbix_agentd -c /opt/zabbix/etc/zabbix_agentd.conf 
  
 Pour que zabbix se lance au démarrage, j'ai créé le fichier suivant Pour que zabbix se lance au démarrage, j'ai créé le fichier suivant
Ligne 192: Ligne 227:
         date         date
 end script end script
-exec "/opt/zabbix/sbin/zabbix_agentd -c /opt/zabbix/etc/zabbix_agentd.conf"+exec "/opt/zabbix/sbin/zabbix_agentd -c /opt/zabbix/conf/zabbix_agentd.conf"
 # vim:ft=upstart</code> # vim:ft=upstart</code>
linux/zabbix.1404828257.txt.gz · Dernière modification: 08-07-2014 16:04 de edmc73