Error while configuring Linux snmp wizard

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Frédéric GRANAT
Posts: 445
Joined: Mon Nov 19, 2012 11:36 am

Error while configuring Linux snmp wizard

Post by Frédéric GRANAT »

Hi,
I try to configure Linux SNMP.
On step 1, let the default version 2c, enter the IP address
On step 2, I have the following error :

Code: Select all

The wizard detected that this server does not have snmpwalk permission on the target host. This will prevent auto population of processes and prevent them from running successfully, but you can continue with the wizard manually. To troubleshoot this ensure that these OIDs are available on the target host: "HOST-RESOURCES-MIB::hrSWRunName" and "HOST-RESOURCES-MIB::hrFSMountPoint".
Please help me
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Error while configuring Linux snmp wizard

Post by rkennedy »

From the CLI of Nagios XI - can you attempt to run a SNMPwalk manually? Should be something like this - snmpwalk -v 2c -c <yourcommunity> ip.of.client.machine

Please show us teh full output.
Former Nagios Employee
Frédéric GRANAT
Posts: 445
Joined: Mon Nov 19, 2012 11:36 am

Re: Error while configuring Linux snmp wizard

Post by Frédéric GRANAT »

Hi,
Here's the result :

Code: Select all

[root@nagiosxi ~]# snmpwalk -v 2c -c public xxxxxxx
Timeout: No Response from xxxxxxx
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Error while configuring Linux snmp wizard

Post by dwhitfield »

What's the output of nmap remotehost -p 161?

Also, could you post your /etc/snmp/snmpd.conf from the remote host?
Frédéric GRANAT
Posts: 445
Joined: Mon Nov 19, 2012 11:36 am

Re: Error while configuring Linux snmp wizard

Post by Frédéric GRANAT »

Code: Select all

[root@nagiosxi ~]# nmap xxx.xx.x.xx -p 161

Starting Nmap 6.47 ( http://nmap.org ) at 2017-02-27 17:29 CET
Nmap scan report for iparapheurtestcd04.cg.ahp (xxx.xx.x.xx)
Host is up (0.00036s latency).
PORT    STATE  SERVICE
161/tcp closed snmp
MAC Address: 00:50:56:B1:31:8F (VMware)

Nmap done: 1 IP address (1 host up) scanned in 0.07 seconds
on remote host, /etc doesn't contain snmp directory
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Error while configuring Linux snmp wizard

Post by dwhitfield »

If you followed the instructions at https://assets.nagios.com/downloads/nag ... g_SNMP.pdf, it looks like the part about the firewall didn't take or was overwritten by something else.

Did you follow those instructions? Also, what OS/version is the remote host? That will help us give more specific commands.
Frédéric GRANAT
Posts: 445
Joined: Mon Nov 19, 2012 11:36 am

Re: Error while configuring Linux snmp wizard

Post by Frédéric GRANAT »

Hi,
I've just tried :

Code: Select all

libriciel@iparapheurtestcd04:~$ sudo ufw allow snmp
[sudo] password for libriciel:
Rules updated
Rules updated (v6)
libriciel@iparapheurtestcd04:~$ sudo ufw reload
Firewall not enabled (skipping reload)
libriciel@iparapheurtestcd04:~$
Frédéric GRANAT
Posts: 445
Joined: Mon Nov 19, 2012 11:36 am

Re: Error while configuring Linux snmp wizard

Post by Frédéric GRANAT »

OS of the remote host : Ubuntu 16.04.1 LTS
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Error while configuring Linux snmp wizard

Post by dwhitfield »

Try nmap -sU localhost -p 161

Are you sure your community string is public? Can you try snmpwalk -v 1 -c public xxxxxxx?

If you want to PM the snmp.conf rather than posting it here, that is fine. Just make sure you update the thread some it comes back on our support dashboard.

On the ubuntu machine, please run systemctl restart snmpd and let us know if there is any output and what it is.

It's possible that on ubuntu you need to run the following:

Code: Select all

sudo apt-get update
sudo apt-get install snmpd
Frédéric GRANAT
Posts: 445
Joined: Mon Nov 19, 2012 11:36 am

Re: Error while configuring Linux snmp wizard

Post by Frédéric GRANAT »

Hi
Try nmap -sU localhost -p 161
=> On which machine (Nagios or monitored server).
If you want to PM the snmp.conf rather than posting it here, that is fine. Just make sure you update the thread some it comes back on our support dashboard.
=> As I said : on remote host, /etc doesn't contain snmp directory (so, no snmp.conf)

On nagios server :

Code: Select all

[root@nagiosxi ~]# snmpwalk -v 1 -c public 172.16.1.19
Timeout: No Response from 172.16.1.19
You have mail in /var/spool/mail/root
On monitored server :

Code: Select all

libriciel@iparapheurtestcd04:~$ systemctl restart snmpd
==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ===
Authentication is required to restart 'snmpd.service'.
Authenticating as: libriciel,,, (libriciel)
Password:
==== AUTHENTICATION COMPLETE ===
Failed to restart snmpd.service: Unit snmpd.service not found.
Then

Code: Select all

libriciel@iparapheurtestcd04:~$ sudo apt-get update
[sudo] password for libriciel:
Atteint:1 http://fr.archive.ubuntu.com/ubuntu xenial InRelease
Réception de:2 http://security.ubuntu.com/ubuntu xenial-security InRelease [102 kB]
Réception de:3 http://fr.archive.ubuntu.com/ubuntu xenial-updates InRelease [102 kB]
Réception de:4 http://fr.archive.ubuntu.com/ubuntu xenial-backports InRelease [102 kB]
Réception de:5 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages [219 kB]
Réception de:6 http://fr.archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages [485 kB]
Réception de:7 http://security.ubuntu.com/ubuntu xenial-security/main i386 Packages [212 kB]
Réception de:8 http://fr.archive.ubuntu.com/ubuntu xenial-updates/main i386 Packages [475 kB]
Réception de:9 http://security.ubuntu.com/ubuntu xenial-security/universe amd64 Packages [79,1 kB]
Réception de:10 http://security.ubuntu.com/ubuntu xenial-security/universe i386 Packages [74,1 kB]
Réception de:11 http://security.ubuntu.com/ubuntu xenial-security/universe Translation-en [43,9 kB]
Réception de:12 http://fr.archive.ubuntu.com/ubuntu xenial-updates/main Translation-en [193 kB]
Réception de:13 http://fr.archive.ubuntu.com/ubuntu xenial-updates/universe amd64 Packages [411 kB]
Réception de:14 http://fr.archive.ubuntu.com/ubuntu xenial-updates/universe i386 Packages [405 kB]
Réception de:15 http://fr.archive.ubuntu.com/ubuntu xenial-updates/universe Translation-en [155 kB]
3 058 ko réceptionnés en 1s (1 682 ko/s)
Lecture des listes de paquets... Fait
libriciel@iparapheurtestcd04:~$ sudo apt-get install snmpd
Lecture des listes de paquets... Fait
Construction de l'arbre des dépendances
Lecture des informations d'état... Fait
Les paquets suivants ont été installés automatiquement et ne sont plus nécessaires :
  linux-headers-4.4.0-31 linux-headers-4.4.0-31-generic linux-headers-4.4.0-62
  linux-headers-4.4.0-62-generic linux-image-4.4.0-31-generic
  linux-image-4.4.0-62-generic linux-image-extra-4.4.0-31-generic
  linux-image-extra-4.4.0-62-generic
Veuillez utiliser « sudo apt autoremove » pour les supprimer.
The following additional packages will be installed:
  libsensors4 libsnmp-base libsnmp30
Paquets suggérés :
  lm-sensors snmp-mibs-downloader snmptrapd
Les NOUVEAUX paquets suivants seront installés :
  libsensors4 libsnmp-base libsnmp30 snmpd
0 mis à jour, 4 nouvellement installés, 0 à enlever et 28 non mis à jour.
Il est nécessaire de prendre 1 123 ko dans les archives.
Après cette opération, 4 378 ko d'espace disque supplémentaires seront utilisés.
Souhaitez-vous continuer ? [O/n] O
Réception de:1 http://fr.archive.ubuntu.com/ubuntu xenial/main amd64 libsensors4 amd64 1:3.4.0-2 [28,4 kB]
Réception de:2 http://fr.archive.ubuntu.com/ubuntu xenial/main amd64 libsnmp-base all 5.7.3+dfsg-1ubuntu4 [224 kB]
Réception de:3 http://fr.archive.ubuntu.com/ubuntu xenial/main amd64 libsnmp30 amd64 5.7.3+dfsg-1ubuntu4 [813 kB]
Réception de:4 http://fr.archive.ubuntu.com/ubuntu xenial/main amd64 snmpd amd64 5.7.3+dfsg-1ubuntu4 [57,1 kB]
1 123 ko réceptionnés en 0s (2 759 ko/s)
Préconfiguration des paquets...
Sélection du paquet libsensors4:amd64 précédemment désélectionné.
(Lecture de la base de données... 199269 fichiers et répertoires déjà installés.)
Préparation du dépaquetage de .../libsensors4_1%3a3.4.0-2_amd64.deb ...
Dépaquetage de libsensors4:amd64 (1:3.4.0-2) ...
Sélection du paquet libsnmp-base précédemment désélectionné.
Préparation du dépaquetage de .../libsnmp-base_5.7.3+dfsg-1ubuntu4_all.deb ...
Dépaquetage de libsnmp-base (5.7.3+dfsg-1ubuntu4) ...
Sélection du paquet libsnmp30:amd64 précédemment désélectionné.
Préparation du dépaquetage de .../libsnmp30_5.7.3+dfsg-1ubuntu4_amd64.deb ...
Dépaquetage de libsnmp30:amd64 (5.7.3+dfsg-1ubuntu4) ...
Sélection du paquet snmpd précédemment désélectionné.
Préparation du dépaquetage de .../snmpd_5.7.3+dfsg-1ubuntu4_amd64.deb ...
Dépaquetage de snmpd (5.7.3+dfsg-1ubuntu4) ...
Traitement des actions différées (« triggers ») pour man-db (2.7.5-1) ...
Traitement des actions différées (« triggers ») pour libc-bin (2.23-0ubuntu5) ...
Traitement des actions différées (« triggers ») pour systemd (229-4ubuntu16) ...
Traitement des actions différées (« triggers ») pour ureadahead (0.100.0-19) ...
Paramétrage de libsensors4:amd64 (1:3.4.0-2) ...
Paramétrage de libsnmp-base (5.7.3+dfsg-1ubuntu4) ...
Paramétrage de libsnmp30:amd64 (5.7.3+dfsg-1ubuntu4) ...
Paramétrage de snmpd (5.7.3+dfsg-1ubuntu4) ...
adduser: Warning: The home directory `/var/lib/snmp' does not belong to the user you are currently creating.
update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults
update-rc.d: warning: stop runlevel arguments (1) do not match snmpd Default-Stop values (0 1 6)
insserv: warning: script 'K01alfresco' missing LSB tags and overrides
insserv: warning: script 'alfresco' missing LSB tags and overrides
Traitement des actions différées (« triggers ») pour libc-bin (2.23-0ubuntu5) ...
Traitement des actions différées (« triggers ») pour systemd (229-4ubuntu16) ...
Traitement des actions différées (« triggers ») pour ureadahead (0.100.0-19) ...
libriciel@iparapheurtestcd04:~$
Locked