Outils pour utilisateurs

Outils du site


linux:zabbix (lu 25152 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 15:11]
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 130: Ligne 132:
 ===== Installation sur synology ===== ===== Installation sur synology =====
  
-http://weblog.aklmedia.nl/2011/05/install-zabbix-agent-on-synology/+Trouvez le type de CPU de votre synology => http://forum.synology.com/wiki/index.php/What_kind_of_CPU_does_my_NAS_have
  
-Au final, je crois que ce tuto n'pas marché pour moiJe suis arrivé à mes fins en téléchargeant les binaires déjà compilés et fournis par zabbix => http://www.zabbix.com/download.php+Pour installer ipkg => http://korben.info/installer-ipkg-sur-synology.html 
 + 
 +Sur certain NASon peut le trouver dans /opt/bin ou /opt/sbin 
 + 
 +Un tuto pour compiler zabbix http://weblog.aklmedia.nl/2011/05/install-zabbix-agent-on-synology/ 
 + 
 +A rajouter au tuto : 
 +Créer un utilisateur zabbix en éditant le /etc/passwd et /etc/group (je n'ai pas trouvé la commande adduser ou useradd) 
 +  echo 'zabbix:x:1200:200::/opt/zabbix:/bin/false' >> /etc/passwd 
 +  echo 'zabbix:x:200' >> /etc/group 
 + 
 +Lancez l'agent zabbix via la commande 
 +  /opt/zabbix/sbin/zabbix_agentd -c /opt/zabbix/conf/zabbix_agentd.conf 
 + 
 +On peut vérifier le bon fonctionnement avec ps 
 +<code>> ps | grep zabbix 
 +19600 zabbix    3040 S    ./zabbix_agentd -c /opt/zabbix/etc/zabbix_agentd.conf 
 +19601 zabbix    3040 S    ./zabbix_agentd: collector [idle 1 sec] 
 +19602 zabbix    3092 S    ./zabbix_agentd: active checks #1 [idle 1 sec] 
 +</code> 
 +et le fichier de log 
 +<code>> cat /tmp/zabbix_agentd.log  
 + 19600:20140708:160131.502 Starting Zabbix Agent [nas3]. Zabbix 2.2.4 (revision 46772). 
 + 19600:20140708:160131.503 using configuration file: /opt/zabbix/conf/zabbix_agentd.conf 
 + 19601:20140708:160131.507 agent #0 started [collector] 
 + 19602:20140708:160131.513 agent #1 started [active checks #1] 
 + 19602:20140708:160131.572 active check "system.distrib" is not supported 
 + 19602:20140708:160131.573 active check "system.hw.cpu" is not supported 
 +</code> 
 + 
 +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 ! 
 + 
 +--- 
 + 
 +Suivant les NAS, ce tuto ne marchera pas. Dans ce cas téléchargez les binaires déjà compilés et fournis par zabbix => http://www.zabbix.com/download.php
  
 Regardez le type de processeur avec la commande Regardez le type de processeur avec la commande
Ligne 138: 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 158: 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.1404825089.txt.gz · Dernière modification: 08-07-2014 15:11 de edmc73