1) First take info from /proc/user_beancounters
2) Take string from first script via SNMP and output string like
But I need help with cacti... need to write templates and all another rules.kmemsize_held:3161584 kmemsize_maxheld:4879790 kmemsize_limit:11055923 kmemsize_failcnt:0 lockedpages_held:0 lockedpages_maxheld:0 lockedpages_limit:2560 lockedpages_failcnt:0 privvmpages_held:512510 privvmpages_maxheld:557882 privvmpages_limit:705536 privvmpages_failcnt:0 shmpages_held:0 shmpages_maxheld:0 shmpages_limit:21504 shmpages_failcnt:0 numproc_held:42 numproc_maxheld:139 numproc_limit:2400 numproc_failcnt:0 physpages_held:118975 physpages_maxheld:166273 physpages_limit:0 physpages_failcnt:0 vmguarpages_held:0 vmguarpages_maxheld:0 vmguarpages_limit:33792 vmguarpages_failcnt:0 oomguarpages_held:118975 oomguarpages_maxheld:166273 oomguarpages_limit:26112 oomguarpages_failcnt:0 numtcpsock_held:8 numtcpsock_maxheld:126 numtcpsock_limit:3600 numtcpsock_failcnt:0 numflock_held:4 numflock_maxheld:5 numflock_limit:1880 numflock_failcnt:0 numpty_held:1 numpty_maxheld:3 numpty_limit:160 numpty_failcnt:0 numsiginfo_held:0 numsiginfo_maxheld:13 numsiginfo_limit:2560 numsiginfo_failcnt:0 tcpsndbuf_held:1025264 tcpsndbuf_maxheld:2715504 tcpsndbuf_limit:17203200 tcpsndbuf_failcnt:0 tcprcvbuf_held:122528 tcprcvbuf_maxheld:1530176 tcprcvbuf_limit:1720320 tcprcvbuf_failcnt:0 othersockbuf_held:8896 othersockbuf_maxheld:1125984 othersockbuf_limit:11260800 othersockbuf_failcnt:522 dgramrcvbuf_held:0 dgramrcvbuf_maxheld:7200 dgramrcvbuf_limit:262144 dgramrcvbuf_failcnt:0 numothersock_held:5 numothersock_maxheld:10 numothersock_limit:3600 numothersock_failcnt:0 dcachesize_held:0 dcachesize_maxheld:0 dcachesize_limit:3409920 dcachesize_failcnt:0 numfile_held:2651 numfile_maxheld:6462 numfile_limit:19312 numfile_failcnt:0 numiptent_held:10 numiptent_maxheld:10 numiptent_limit:1280 numiptent_failcnt:0
How It`s work:
On client where install SNMP on OpenVZ machine you need to add in file /etc/snmp/snmpd.conf
This string: extend .1.3.6.1.4.1.2021.8 openvz /usr/share/snmp/openvz.sh
And put openvz.sh to /usr/share/snmp/
Than restart snmpd.
On server mashine, where is we install cacti:
Copy file Openvz-get.sh to <cacti>/resource/scripts/
This file work with 3 argv
Openvz-get.sh <HOSTNAME> <PORT> <COMMUNITY>
i hope, that this theme don`t die...