LibreNMS - snmp extend proxmox: Difference between revisions

From Wiki.IT-Arts.net
imported>Z
No edit summary
imported>Z
No edit summary
Line 22: Line 22:
  <nowiki>
  <nowiki>
Debian-snmp ALL=(ALL) NOPASSWD: /usr/local/bin/proxmox</nowiki>
Debian-snmp ALL=(ALL) NOPASSWD: /usr/local/bin/proxmox</nowiki>
= Unix Agent =
Get the UNIX agent:
<nowiki>
cd /opt/ && git clone https://github.com/librenms/librenms-agent.git && cd librenms-agent</nowiki>
Deploy the Check_mk and SystemD files:
<nowiki>
cp check_mk_agent /usr/bin/check_mk_agent && cp check_mk@.service check_mk.socket /etc/systemd/system</nowiki>
Create the relevant directories and change user:
<nowiki>
mkdir -p /usr/lib/check_mk_agent/plugins /usr/lib/check_mk_agent/local && chmod -R Debian:snmp:Debian-snmp /usr/lib/check_mk_agent</nowiki>
Enable the check_mk service:
<nowiki>
systemctl enable check_mk.socket && systemctl start check_mk.socket</nowiki>




Line 56: Line 76:
* https://docs.librenms.org/Extensions/Applications/#proxmox
* https://docs.librenms.org/Extensions/Applications/#proxmox
* https://docs.librenms.org/Extensions/Applications/
* https://docs.librenms.org/Extensions/Applications/
* https://docs.librenms.org/Extensions/Agent-Setup/






----
----

Revision as of 11:24, 3 May 2020



Verify you have installed:

apt install libpve-apiclient-perl


NginX LibreNMS script

Get the script and make it executable:

wget https://raw.githubusercontent.com/librenms/librenms-agent/master/agent-local/proxmox -O /usr/local/bin/proxmox && chmod +x /usr/local/bin/proxmox


sudo Configuration

Adapt your /etc/sudoers with:

Debian-snmp ALL=(ALL) NOPASSWD: /usr/local/bin/proxmox


Unix Agent

Get the UNIX agent:

cd /opt/ && git clone https://github.com/librenms/librenms-agent.git && cd librenms-agent

Deploy the Check_mk and SystemD files:

cp check_mk_agent /usr/bin/check_mk_agent && cp check_mk@.service check_mk.socket /etc/systemd/system

Create the relevant directories and change user:

mkdir -p /usr/lib/check_mk_agent/plugins /usr/lib/check_mk_agent/local && chmod -R Debian:snmp:Debian-snmp /usr/lib/check_mk_agent

Enable the check_mk service:

systemctl enable check_mk.socket && systemctl start check_mk.socket


SNMP Configuration

Adapt your /etc/snmp/snmpd.conf with:

extend proxmox /usr/bin/sudo /usr/local/bin/proxmox

Restart the service.


LibreNMS Configuration

Add to your /opt/librenms/config.php:

# Enable Proxmox Graphs
$config['enable_proxmox'] = 1;


Check Command

Adapt the user and path to your configuration:

sudo -u Debian-snmp /usr/bin/sudo /usr/local/bin/proxmox


Sources