Munin et windows et SNMP

Bonjour,

Je dois mettre en place un monitoring de notre serveur WEB (IIS sur serveur 2k3). J’ai vu les comparaisons sur internet et mon choix s’est porté sur Munin. Mon installation fonctionne bien, j’ai les graph de mon localhost.

Afin de l’utiliser avec Windows, je dois utiliser le SNMP. J’ai suivi ce tuto : ultrabill.net/index.php/2006 … et-windows
afin de tester le tout avec mon poste sous XP Pro mais au bout de quelque heures, aucun graphe.

Je ne sais pas quel fichier de configuration vous montrez, alors si quelqu’un veut une configuration, je la mettrais en ligne.

J’utilise une debian etch
Linux debian-srv3 2.6.18-5-686 #1 SMP Fri Jun 1 00:47:00 UTC 2007 i686 GNU/Linux

Merci à tous :slightly_smiling:

Salut,

Je suppose que tu as adapter les fichiers de muni du tuto à ton réseau ?

que te donne un:

snmpwalk -v 2c -c public <ip_de_ton_serveur_windows> 

Change le nom de communauté si tu n’as pas laisser public (ce qui est conseiller d’ailleurs)

Sous windows as tu autorisé l’ip de ton serveur à l’interroger via snmp ? Dans l’onglet sécurité via “service/Service snmp”

Personnellement je travailler plutôt sur Nagios avec NagiosGrapher (système de graph avec rrdtools comme munin) L’avantage est que Nagios peut créer des alertes en fcontion des services que tu lui demande de vérifier. (tout ceci juste pour info)

Salut Ludo,

La commande

me renvoit beaucoup d’information donc en voici une partie :

HOST-RESOURCES-MIB::hrSWInstalledDate.62 = STRING: 2008-4-7,9:13:46.0 HOST-RESOURCES-MIB::hrSWInstalledDate.63 = STRING: 2008-4-7,11:27:34.0 HOST-RESOURCES-MIB::hrSWInstalledDate.64 = STRING: 2008-4-7,11:27:6.0 HOST-RESOURCES-MIB::hrSWInstalledDate.65 = STRING: 2008-4-7,9:27:40.0 HOST-RESOURCES-MIB::hrSWInstalledDate.66 = STRING: 2008-4-7,9:17:22.0 HOST-RESOURCES-MIB::hrSWInstalledDate.67 = STRING: 2008-4-22,12:10:18.0 HOST-RESOURCES-MIB::hrSWInstalledDate.68 = STRING: 2008-4-7,9:17:42.0 HOST-RESOURCES-MIB::hrSWInstalledDate.69 = STRING: 2008-4-29,15:44:18.0 HOST-RESOURCES-MIB::hrSWInstalledDate.70 = STRING: 2008-4-2,17:28:18.0 HOST-RESOURCES-MIB::hrSWInstalledDate.71 = STRING: 2008-4-26,3:4:28.0 HOST-RESOURCES-MIB::hrSWInstalledDate.72 = STRING: 2008-4-7,10:15:38.0 HOST-RESOURCES-MIB::hrSWInstalledDate.73 = STRING: 2008-4-30,11:57:56.0 HOST-RESOURCES-MIB::hrSWInstalledDate.74 = STRING: 2008-4-22,12:53:40.0 HOST-RESOURCES-MIB::hrSWInstalledDate.75 = STRING: 2008-4-2,18:1:4.0 HOST-RESOURCES-MIB::hrSWInstalledDate.76 = STRING: 2008-4-2,17:15:12.0 HOST-RESOURCES-MIB::hrSWInstalledDate.77 = STRING: 2008-6-6,10:45:10.0 HOST-RESOURCES-MIB::hrSWInstalledDate.78 = STRING: 2008-6-4,16:16:10.0 HOST-RESOURCES-MIB::hrSWInstalledDate.79 = STRING: 2008-4-7,10:16:6.0 HOST-RESOURCES-MIB::hrSWInstalledDate.80 = STRING: 2008-6-6,10:54:26.0 HOST-RESOURCES-MIB::hrSWInstalledDate.81 = STRING: 2008-6-6,10:9:36.0 HOST-RESOURCES-MIB::hrSWInstalledDate.82 = STRING: 2008-4-2,17:13:0.0 HOST-RESOURCES-MIB::hrSWInstalledDate.83 = STRING: 2008-4-7,9:56:6.0 HOST-RESOURCES-MIB::hrSWInstalledDate.84 = STRING: 2008-4-2,17:22:24.0

En analysant les trame j’ai vu que le tout communiquait en SNMP.

J’ai bien effectué le paramétrage en fonction de mon réseau oui, et cela fonctionne.

NAGIOS
J’ai tenté de l’utiliser pendant une longue période, mais en vain. Je suis recement passé sous oreon, et la j’my perd completement dans la configuration. Mes fichiers de nagios (utilisé sur une version 1.X) ne passe pas, j’ai une erreur

[code]Nagios 2.10
Copyright © 1999-2007 Ethan Galstad (http://www.nagios.org)
Last Modified: 10-21-2007
License: GPL

Reading configuration data…

Error: Invalid hostgroup object directive ‘contact_groups’.
Error: Could not add object property in file ‘/usr/local/nagios/etc/hostgroups.cfg’ on line 19.

***> One or more problems was encountered while processing the config files…

 Check your configuration file(s) to ensure that they contain valid
 directives and data defintions.  If you are upgrading from a previous
 version of Nagios, you should be aware that some variables/definitions
 may have been removed or modified in this version.  Make sure to read
 the HTML documentation regarding the config files, as well as the
 'Whats New' section to find out what has changed.

[/code]

Je suis passé sous munin pour sa simplicité, sachant que je n’ai besoin que de quelque graph concernant notre serveur web. Mais si toi ou quelqu’un a une solution afin de fixer mon centreon, je suis preneur :slightly_smiling:

Si ce n’est que pour des graph et que la notification d’un problème n’est pas une de tes priorité, munin est tout à fait suffisant.

Pour nagios il y à une procédure pour passer de nagios 1 à nagios 2, je sais que certaines différences doivent être changer en passant de nagios 1 à 2 (car oréon n’est qu’un interface simplifie de configuration de nagios, mais derrière c’est nagios qui tourne)

Pour munin, si tu reçois bel et bien les info snmp c’est que la configuration de ton fichier doit comporter une erreur. Mais hélas je ne suis pas un connaisseur de munin donc, je risque de ne savoir t’aider que jusqu’à un certain point.

Je suppose que tout les paquets qui permette de faire des graphe sont installé (rrdtool)

Oui, je n’ai besoin que des graphes, donc munin est parfait :slightly_smiling:

J’ai correctement effectué toutes les installations des divers packages (rrdtool ou snmp), j’ai bien la visualisation des graphs de mon serveur munin (localhost).

Voici mes différents fichiers de conf :

MUNIN.CONF

[code]Example configuration file for Munin, generated by ‘make build’

The next three variables specifies where the location of the RRD

databases, the HTML output, and the logs, severally. They all

must be writable by the user running munin-cron.

dbdir /var/lib/munin
htmldir /var/www/munin
logdir /var/log/munin
rundir /var/run/munin

Where to look for the HTML templates

tmpldir /etc/munin/templates

Make graphs show values per minute instead of per second

#graph_period minute

Drop somejuser@fnord.comm and anotheruser@blibb.comm an email everytime

something changes (OK -> WARNING, CRITICAL -> OK, etc)

#contact.someuser.command mail -s “Munin notification” somejuser@fnord.comm
#contact.anotheruser.command mail -s “Munin notification” anotheruser@blibb.comm

For those with Nagios, the following might come in handy. In addition,

the services must be defined in the Nagios server as well.

#contact.nagios.command /usr/sbin/send_nsca -H nagios.host.com -c /etc/send_nsca.cfg

a simple host tree

[localhost.localdomain]
address 127.0.0.1
use_node_name yes
[info_oa.inergie.com]
address 127.0.0.1
use_node_name no

[serveur_test1.inergie.com]
address 192.168.1.62
use_node_name no

Then we want totals…

[foo.com;Totals] #Force it into the “foo.com”-domain…

update no # Turn off data-fetching for this “host”.

# The graph “load1”. We want to see the loads of both machines…

# “fii=fii.foo.com:load.load” means “label=machine:graph.field”

load1.graph_title Loads side by side

load1.graph_order fii=fii.foo.com:load.load fay=fay.foo.com:load.load

# The graph “load2”. Now we want them stacked on top of each other.

load2.graph_title Loads on top of each other

load2.dummy_field.stack fii=fii.foo.com:load.load fay=fay.foo.com:load.load

load2.dummy_field.draw AREA # We want area instead the default LINE2.

load2.dummy_field.label dummy # This is needed. Silly, really.

# The graph “load3”. Now we want them summarised into one field

load3.graph_title Loads summarised

load3.combined_loads.sum fii.foo.com:load.load fay.foo.com:load.load

load3.combined_loads.label Combined loads # Must be set, as this is

# not a dummy field!

…and on a side note, I want them listen in another order (default is

alphabetically)

# Since [foo.com] would be interpreted as a host in the domain “com”, we

# specify that this is a domain by adding a semicolon.

[foo.com;]

node_order Totals fii.foo.com fay.foo.com

[/code]

MUNIN-NODE.CONF

# Example config-file for munin-node
#

log_level 4
log_file /var/log/munin/munin-node.log
port 4949
pid_file /var/run/munin/munin-node.pid
background 1
setseid 1

# Which port to bind to;
host *
user root
group root
setsid yes

# Regexps for files to ignore

ignore_file ~$
ignore_file \.bak$
ignore_file %$
ignore_file \.dpkg-(tmp|new|old|dist)$
ignore_file \.rpm(save|new)$

# Set this if the client doesn't report the correct hostname when
# telnetting to localhost, port 4949
#
host_name localhost.localdomain


# Regexps for files to ignore

ignore_file ~$
ignore_file \.bak$
ignore_file %$
ignore_file \.dpkg-(tmp|new|old|dist)$
ignore_file \.rpm(save|new)$

# Set this if the client doesn't report the correct hostname when
# telnetting to localhost, port 4949
#
host_name localhost.localdomain

# A list of addresses that are allowed to connect.  This must be a
# regular expression, due to brain damage in Net::Server, which
# doesn't understand CIDR-style network notation.  You may repeat
# the allow line as many times as you'd like

allow ^127\.0\.0\.1$

J’ai également bien les liens vers les plugins snmp de crée :

lrwxrwxrwx 1 root root 33 2008-06-05 11:31 snmp_info_oa.inergie.com_df -> /usr/share/munin/plugins/snmp__df
lrwxrwxrwx 1 root root 34 2008-06-05 11:34 snmp_info_oa.inergie.com_if_2 -> /usr/share/munin/plugins/snmp__if_
lrwxrwxrwx 1 root root 38 2008-06-05 11:31 snmp_info_oa.inergie.com_if_err_2 -> /usr/share/munin/plugins/snmp__if_err_
lrwxrwxrwx 1 root root 40 2008-06-05 11:33 snmp_info_oa.inergie.com_processes -> /usr/share/munin/plugins/snmp__processes
lrwxrwxrwx 1 root root 36 2008-06-05 11:31 snmp_info_oa.inergie.com_users -> /usr/share/munin/plugins/snmp__users
lrwxrwxrwx 1 root root 33 2008-06-05 16:04 snmp_serveur_test1.inergie.com_df -> /usr/share/munin/plugins/snmp__df
lrwxrwxrwx 1 root root 34 2008-06-05 16:04 snmp_serveur_test1.inergie.com_if_65539 -> /usr/share/munin/plugins/snmp__if_
lrwxrwxrwx 1 root root 38 2008-06-05 16:04 snmp_serveur_test1.inergie.com_if_err_65539 -> /usr/share/munin/plugins/snmp__if_err_
lrwxrwxrwx 1 root root 40 2008-06-05 16:04 snmp_serveur_test1.inergie.com_processes -> /usr/share/munin/plugins/snmp__processes
lrwxrwxrwx 1 root root 36 2008-06-05 16:04 snmp_serveur_test1.inergie.com_users -> /usr/share/munin/plugins/snmp__users

Au niveau des services snmp sous windows, les machines accepte en lecture et écrire les requetes du domain “public” venant de toutes les machines.

Je suis pas assez calé avec Munin pour t’aider à te dépatouiller. A priori cela doit être un problème de configuration car tu recois les infos snmp de ton serveur, donc c’est la façons de traiter cette info qui pose problème. :neutral_face: