Observium Turnkey and Proxmox

MisterY

Well-Known Member
Oct 10, 2016
136
4
58
37
Hi,

I got a running Observium-Turnkey LXC. It can monitor itself and my switch. But I can't add my proxmox-host to it. What am I doing wrong?

my /etc/snmp/snmpd.conf
Code:
#  AGENT BEHAVIOUR
#  Listen for connections from the local system only
#agentAddress  udp:127.0.0.1:161
#  Listen for connections on all interfaces (both IPv4 *and* IPv6)
agentAddress udp:161
#udp6:[::1]:161 (I only use IPv4)

...

#  ACCESS CONTROL
#

                                                #  system + hrSystem groups only
view   systemonly  included   .1.3.6.1.2.1.1
view   systemonly  included   .1.3.6.1.2.1.25.1

                                                #  Full access from the local host
#rocommunity public  localhost
                                                #  Default access to basic system info
# rocommunity public  default    -V systemonly
                                                #  rocommunity6 is for IPv6
# rocommunity6 public  default   -V systemonly

and I added in the "/etc/default/snmpd" the IP-Addresses "127.0.0.1 192.168.0.101"(IP of NIC1 from the Proxmox-Host)

I get everytime the error

Code:
Adding SNMPv3 host 192.168.0.101 port 161
Trying v3 parameters authOnlyUser/authNoPriv ...
No reply on credentials authOnlyUser/authNoPriv using v3.
Trying v3 parameters observium/noAuthNoPriv ...
No reply on credentials observium/noAuthNoPriv using v3.
Could not reach 192.168.0.101 with given SNMP parameters using v3.

user and pw is correct.

Any ideas?
 
SNMPD is not by default installed on proxmox.

apt-get install snmpd

edit the configuration file to allow remote connections and restart it

service snmpd restart
 
If I edit an existing /etc/snmp/snmpd.conf file, it seems that I already installed snmpd before, right? ;)

So:
- I installed snmpd
- I configured the file as you can see above <-- is here an error???
- I restarted snmpd about 30 times (and the process is running)
 
1. Are you editing / starting the SNMP service on the proxmox host or the observium LXC?
2. check SNMP service is running:
  • ps axuw |grep snmpd
  • netstat -ntpl | grep 161
3. have you tried an snmpwalk from localhost?
4. Do you have a network route between the LXC and the proxmox server? are they on the same network, inside the same VLAN?
 
1. I edit it on the proxmox-host since I want it to be connected as a device. The snmp service on the observium lxc is configured and running. It monitors itself and my switch.
2.
Code:
ps axuw |grep snmpd
Debian-+ 10134  0.2  0.0  58508  9672 ?        Ss   15:04   0:00 /usr/sbin/snmpd -Lsd -Lf /dev/null -u Debian-snmp -g Debian-snmp -I -smux mteTrigger mteTriggerConf -f
user  11446  0.0  0.0  12784   980 pts/5    S+   15:06   0:00 grep snmpd
postfix  21404  0.0  0.0  52752  6912 ?        S    12:08   0:08 /usr/sbin/snmpd -Lsd -Lf /dev/null -u snmp -g snmp -I -smux mteTrigger mteTriggerConf -p /run/snmpd.pid

netstat is empty
3. yes I did, but here's no connection possible. But I can connect to my observium lxc from the proxmox-host. If I try to connect from the lxc to the host I get
"Error in packet.
Reason: authorizationError (access denied to that object)"

4. Same Network, same subnet.
 
Here's a copy of my /etc/default/snmpd file..

# This file controls the activity of snmpd and snmptrapd

# MIB directories. /usr/share/snmp/mibs is the default, but
# including it here avoids some strange problems.
export MIBDIRS=/usr/share/snmp/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'

# 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


which is working for me
 
hmm thanks, I will take a look.

I got it now running with version v2c. So there must be a problem with the authentification.

Strange: while the observium LXC (snmp v3) can read my sensors, the proxmox-host (v2c) only gives information about uptime and logged in users?
 
I downloaded mibs on the proxmox-host. But still no CPU or LM-Sensors graphs...how can I add them to observium??
 
*push* is it because of snmp v2c? Why do I always get
"Error in packet.
Reason: authorizationError (access denied to that object)"
when I try to use v3??
 
edit the configuration file to allow remote connections and restart it

what needs to be added so they observium (from a lxc inside this proxmox host) can use snmp to check my proxomx host?

INI:
#   Currently, the only supported master agent type for this token
#   is "agentx".
#   
#   arguments: (on|yes|agentx|all|off|no)

master  agentx

# agentaddress: The IP address and port number that the agent will listen on.
#   By default the agent listens to any and all traffic from any
#   interface on the default SNMP port (161).  This allows you to
#   specify which address, interface, transport type and port(s) that you
#   want the agent to listen on.  Multiple definitions of this token
#   are concatenated together (using ':'s).
#   arguments: [transport:]port[@interface/address],...

agentaddress  127.0.0.1,[::1]



###########################################################################
# SECTION: Access Control Setup
#
#   This section defines who is allowed to talk to your running
#   snmp agent.

# Views
#   arguments viewname included [oid]

#  system + hrSystem groups only
view   systemonly  included   .1.3.6.1.2.1.1
view   systemonly  included   .1.3.6.1.2.1.25.1


# rocommunity: a SNMPv1/SNMPv2c read-only access community name
#   arguments:  community [default|hostname|network/bits] [oid | -V view]

# Read-only access to everyone to the systemonly view
rocommunity  public default -V systemonly
rocommunity6 public default -V systemonly

# SNMPv3 doesn't use communities, but users with (optionally) an
# authentication and encryption string. This user needs to be created
# with what they can view with rouser/rwuser lines in this file.
#
# createUser username (MD5|SHA|SHA-512|SHA-384|SHA-256|SHA-224) authpassphrase [DES|AES] [privpassphrase]
# e.g.
# createuser authPrivUser SHA-512 myauthphrase AES myprivphrase
#
# This should be put into /var/lib/snmp/snmpd.conf
#
# rouser: a SNMPv3 read-only access username
#    arguments: username [noauth|auth|priv [OID | -V VIEW [CONTEXT]]]
rouser authPrivUser authpriv -V systemonly
192.168.178.253
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!