Giter VIP home page Giter VIP logo

proxmox-snmp's Introduction

Configuration on Proxmox

Install snmpd

apt install snmpd

Configure snmpd

Paste content from snmpd.conf to /etc/snmp/snmpd.conf

nano /etc/snmp/snmpd.conf

Paste content from sh file to /opt folder and make executable

nano /opt/snmp-cpu-temp.sh
nano /opt/snmp-smart-status.sh
nano /opt/snmp-lvm-used.sh for LVM
nano /opt/snmp-zfs-used.sh for ZFS
nano /opt/snmp-ceph-used.sh for Ceph
chmod +x /opt/snmp-*

Run snmpd as root, because debian added the user "Debian-snmp" to the snmp.service but for SMART/LVM Status we need to be root.

edit snmpd.service and replace "Debian-snmp" with "root"

nano /lib/systemd/system/snmpd.service

From
ExecStart=/usr/sbin/snmpd -Lsd -Lf /dev/null -u Debian-snmp -g Debian-snmp -I -smux,mteTrigger,mteTriggerConf -f -p /run/snmpd.pid
To
ExecStart=/usr/sbin/snmpd -Lsd -Lf /dev/null -u root -g Debian-snmp -I -smux,mteTrigger,mteTriggerConf -f -p /run/snmpd.pid

Restart SNMPD

systemctl restart snmpd.service

Configuration on PRTG WebUI

CPU temperature

  • Add sensor
  • SNMP Custom
  • Name = CPU Temp
  • OID = .1.3.6.1.2.1.25.1.8
  • Channel Name = Temperature
  • Unit String = °C

LVM used

  • Add sensor
  • SNMP Custom
  • Name = LVM allocated pool data
  • OID = .1.3.6.1.2.1.25.1.9
  • Channel Name = LVM used
  • Unit String = %

SMART status

  • Add sensor
  • SNMP Custom String
  • Name = SMART status
  • OID = .1.3.6.1.2.1.25.1.10
  • Response Must Include (Down Status) = PASSED
  • Response Must Include (Warning Status) = PASSED

PRTG

proxmox-snmp's People

Contributors

cologran avatar in-famous-raccoon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

proxmox-snmp's Issues

add ceph support

It would be great to have ceph support

root@pve-01:~# ceph osd df
ID  CLASS  WEIGHT   REWEIGHT  SIZE     RAW USE  DATA     OMAP     META     AVAIL    %USE   VAR   PGS  STATUS
 0    hdd  6.00380   1.00000  6.0 TiB  930 GiB  370 GiB   50 MiB  2.3 GiB  5.1 TiB  15.13  1.00  127      up
 1    hdd  6.00380   1.00000  6.0 TiB  920 GiB  360 GiB   47 MiB  2.2 GiB  5.1 TiB  14.97  0.98  122      up
 2    hdd  6.00380   1.00000  6.0 TiB  974 GiB  414 GiB   53 MiB  2.4 GiB  5.1 TiB  15.84  1.04  141      up
 3    hdd  6.00380   1.00000  6.0 TiB  908 GiB  348 GiB   73 MiB  2.4 GiB  5.1 TiB  14.77  0.97  120      up
 4    hdd  6.00380   1.00000  6.0 TiB  953 GiB  393 GiB   55 MiB  2.5 GiB  5.1 TiB  15.49  1.02  135      up
 5    hdd  6.00380   1.00000  6.0 TiB  943 GiB  383 GiB   53 MiB  2.3 GiB  5.1 TiB  15.34  1.01  131      up
 6    hdd  6.00380   1.00000  6.0 TiB  957 GiB  397 GiB   52 MiB  2.5 GiB  5.1 TiB  15.57  1.02  136      up
 7    hdd  6.00380   1.00000  6.0 TiB  891 GiB  331 GiB   46 MiB  2.0 GiB  5.1 TiB  14.49  0.95  113      up
 8    hdd  6.00380   1.00000  6.0 TiB  903 GiB  343 GiB   72 MiB  2.0 GiB  5.1 TiB  14.68  0.97  119      up
 9    hdd  6.00380   1.00000  6.0 TiB  944 GiB  384 GiB   51 MiB  2.5 GiB  5.1 TiB  15.35  1.01  131      up
10    hdd  6.00380   1.00000  6.0 TiB  961 GiB  401 GiB   54 MiB  2.4 GiB  5.1 TiB  15.63  1.03  137      up
11    hdd  6.00380   1.00000  6.0 TiB  880 GiB  320 GiB   45 MiB  2.0 GiB  5.1 TiB  14.32  0.94  109      up
12    hdd  6.00380   1.00000  6.0 TiB  985 GiB  425 GiB   59 MiB  2.5 GiB  5.0 TiB  16.01  1.05  145      up
13    hdd  6.00380   1.00000  6.0 TiB  925 GiB  365 GiB   51 MiB  2.2 GiB  5.1 TiB  15.05  0.99  126      up
14    hdd  6.00380   1.00000  6.0 TiB  923 GiB  363 GiB   46 MiB  2.1 GiB  5.1 TiB  15.02  0.99  124      up
15    hdd  6.00380   1.00000  6.0 TiB  955 GiB  395 GiB   53 MiB  2.3 GiB  5.1 TiB  15.53  1.02  134      up
16    hdd  6.00380   1.00000  6.0 TiB  897 GiB  337 GiB   47 MiB  2.1 GiB  5.1 TiB  14.59  0.96  116      up
17    hdd  6.00380   1.00000  6.0 TiB  936 GiB  376 GiB   48 MiB  2.3 GiB  5.1 TiB  15.22  1.00  128      up
18    hdd  6.00380   1.00000  6.0 TiB  981 GiB  421 GiB   53 MiB  2.4 GiB  5.0 TiB  15.96  1.05  143      up
19    hdd  6.00380   1.00000  6.0 TiB  901 GiB  341 GiB   47 MiB  2.1 GiB  5.1 TiB  14.65  0.96  117      up
20    hdd  6.00380   1.00000  6.0 TiB  939 GiB  379 GiB   73 MiB  2.3 GiB  5.1 TiB  15.27  1.00  131      up
21    hdd  6.00380   1.00000  6.0 TiB  939 GiB  379 GiB   53 MiB  2.3 GiB  5.1 TiB  15.27  1.01  130      up
22    hdd  6.00380   1.00000  6.0 TiB  928 GiB  368 GiB   49 MiB  2.3 GiB  5.1 TiB  15.09  0.99  126      up
23    hdd  6.00380   1.00000  6.0 TiB  954 GiB  394 GiB   52 MiB  2.3 GiB  5.1 TiB  15.51  1.02  134      up
                       TOTAL  144 TiB   22 TiB  8.8 TiB  1.3 GiB   55 GiB  122 TiB  15.20
MIN/MAX VAR: 0.94/1.05  STDDEV: 0.45
root@pve-01:~#

Update for 8.1 Proxmox Support

Doesn't seem to support the newest release of Proxmox. All the scripts seem to return nothing (I'm assuming the path to some of these sensors has changed).

zfs support

The script are a real helper.

When zfs is used the root volume is not correct

mount
rpool/ROOT/pve-1 on / type zfs (rw,relatime,xattr,noacl)
 zpool list rpool
NAME    SIZE  ALLOC   FREE  CKPOINT  EXPANDSZ   FRAG    CAP  DEDUP    HEALTH  ALTROOT
rpool   222G  30.6G   191G        -         -     7%    13%  1.00x    ONLINE  -
root@pve-01:~#

Multi-drive SMART status?

To add support for multiple drives SMART status, would I just create multiple copies of snmp-smart-status.sh? (Editing each one to have the correct drive mount point and perhaps increment the SNMP OID?)

Thank you!

EDIT: Yes this works great

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.