Hello guys.
I am experiencing a huge problem regarding SNMP on the Hardware Node where ProxMox is installed.
We need SNMP to be able to monitor everything in our NOC/Monitoring System.
Because this is not our first server, we did everything as it should be done, but still it wont start.
apt-get install snmp snmpd
and the snmpd.conf file itself
Running /etc/init.d/snmpd start shows:
I also tried to run it from command line like : /usr/sbin/snmpd -Lsd -Lf /dev/null -u snmp -g snmp -I -smux -p /var/run/snmpd.pid PROXMOXIP
But no output or errors.
THE SOLUTION
You will need to add and modify current configuration:
1. In /etc/default/snmpd
2. In /etc/snmp/snmpd.conf add the following
3. Add Non-Free Repo for SNMP MIB's, run this command
4. Start SNMP Daemon running /etc/init.d/snmpd start
Now you can test everything with:
It should show the current IP addresses on the ProxMox Machine.
Thanks.
I am experiencing a huge problem regarding SNMP on the Hardware Node where ProxMox is installed.
We need SNMP to be able to monitor everything in our NOC/Monitoring System.
Because this is not our first server, we did everything as it should be done, but still it wont start.
apt-get install snmp snmpd
Code:
cat /etc/default/snmpd
# This file controls the activity of snmpd and snmptrapd
# Don't load any MIBs by default.
# You might comment this lines once you have the MIBs downloaded.
export MIBS=
# snmpd control (yes means start daemon).
SNMPDRUN=yes
# snmpd options (use syslog, close stdin/out/err).
SNMPDOPTS='-Lsd -Lf /dev/null -u snmp -g snmp -I -smux -p /var/run/snmpd.pid PROXMOXIP'
# snmptrapd control (yes means start daemon). As of net-snmp version
# 5.0, master agentx support must be enabled in snmpd before snmptrapd
# can be run. See snmpd.conf(5) for how to do this.
TRAPDRUN=no
# snmptrapd options (use syslog).
TRAPDOPTS='-Lsd -p /var/run/snmptrapd.pid'
# create symlink on Debian legacy location to official RFC path
SNMPDCOMPAT=yes
and the snmpd.conf file itself
Code:
####################################################
syslocation Datacenter
syscontact NOC
sysServices 72
com2sec local localhost public
com2sec mynetwork 192.168.0.1/24 public
com2sec mynetwork 192.168.0.2/32 public
group MyRWGroup v1 local
group MyRWGroup v2c local
group MyRWGroup usm local
group MyROGroup v1 mynetwork
group MyROGroup v2c mynetwork
group MyROGroup usm mynetwork
view all included .1 80
access MyROGroup "" any noauth exact all none none
access MyRWGroup "" any noauth exact all all none
includeAllDisks 10%
load 12 10 5
Running /etc/init.d/snmpd start shows:
Code:
root@v1:/etc/pve# /etc/init.d/snmpd startStarting network management services: snmpd.
root@v1:/etc/pve#
I also tried to run it from command line like : /usr/sbin/snmpd -Lsd -Lf /dev/null -u snmp -g snmp -I -smux -p /var/run/snmpd.pid PROXMOXIP
But no output or errors.
THE SOLUTION
You will need to add and modify current configuration:
1. In /etc/default/snmpd
Code:
export MIBS=/usr/share/mibs
SNMPDOPTS='-Lsd -Lf /dev/null -u snmp -g snmp -I -smux -p /var/run/snmpd.pid -c /etc/snmp/snmpd.conf'
2. In /etc/snmp/snmpd.conf add the following
Code:
iquerySecName 15
3. Add Non-Free Repo for SNMP MIB's, run this command
Code:
echo "deb http://http.us.debian.org/debian wheezy main non-free" >> /etc/apt/sources.list && apt-get update
apt-get install snmp-mibs-downloader
4. Start SNMP Daemon running /etc/init.d/snmpd start
Now you can test everything with:
Code:
root@v1:~# snmpwalk -v 1 -c public localhost IP-MIB::ipAdEntIfIndex
IP-MIB::ipAdEntIfIndex.192.168.1.101 = INTEGER: 6
IP-MIB::ipAdEntIfIndex.127.0.0.1 = INTEGER: 1
root@v1:~#
It should show the current IP addresses on the ProxMox Machine.
Thanks.