Hello, > I've been trying for three hours now and I seem unable to get the > right collectd-nagios command line to get the percentage of swap used. > > I get the right values when I do the following: > > yha...@grimston:/var/lib/collectd/rrd/yhamon-dev/swap$ sudo -u > nagios /usr/bin/collectd-nagios -s /var/run/collectd-unixsock -H > yhamon-dev -n swap/swap-free OKAY: 0 critical, 0 warning, 1 okay | > value=5.09403e+08;;;; > yha...@grimston:/var/lib/collectd/rrd/yhamon-dev/swap$ sudo -u > nagios /usr/bin/collectd-nagios -s /var/run/collectd-unixsock -H > yhamon-dev -n swap/swap-used OKAY: 0 critical, 0 warning, 1 okay | > value=1.06496e+06;;;; > > But impossible to get a percentage, whatever I try. > Any help would be highly appreciated, as I won't get very far with > just this :(
collectd-nagios can only check against values found in RRD files. AFAIK, collectd's "swap" plugin doesn't record this value. Why don't you use nagios's check_swap plugin ? It has exactly the option you are looking for: $ /usr/lib/nagios/plugins/check_swap -w 100% SWAP WARNING - 99% free (1955 MB out of 1983 MB) |swap=1955MB;1983;0;0;1983 By the way, I use collectd-nagios to check "vmem/vmpage_io-swap", which I find more relevant to monitor than the percentage of swap used. I hope this helps ! Marc _______________________________________________ collectd mailing list [email protected] http://mailman.verplant.org/listinfo/collectd
