Topic: I Wrote A Nagios Plugin For Bitcoin (Read 9511 times)

Activity: 52
Merit: 0
February 15, 2012, 04:52:41 AM
I wrote a Munin plugin for the getinfo data you might like to graph with Munin.

You can graph: wallet balance, peer connections, block number, and difficulty.
full member
Activity: 140
Merit: 100
June 16, 2011, 11:59:08 AM
I care, I'm looking for something like this and will try it out soon.
Nobody else uses it? How weird...
full member
Activity: 307
Merit: 102
July 27, 2010, 11:38:26 PM
I've updated the code in my original post. I'm bumping this thread on the off chance someone would care to use my updated Nagios plugin.
Activity: 102
Merit: 10
July 25, 2010, 02:28:31 PM
I have a munin code for bitcoin, but it's pretty shitty, and I don't have enough time to improve it further.
It makes a lot of assumptions right now, and plotting is bit off too.

case $1 in
                cat <<'EOM'
graph_title Bitcoin Daemon
graph_vlabel Block Count
graph_args --base 1000 -l 68000
#graph_order balance blockcount difficulty
#balance.label balance
blockcount.label blockcount
#blockcount.min 50000
#difficulty.label difficulty
        exit 0;;

#echo "balance.value" `bitcoind getbalance`
echo "blockcount.value" `bitcoind getblockcount`
#echo "difficulty.value" `bitcoind getdifficulty`
full member
Activity: 307
Merit: 102
July 25, 2010, 04:40:45 AM
Update: Cleaned up the code once yore pointed me to the json_decode() function. Also removed unnecessary rounding code.
Update 07/27/2010: Cleaned up the code a bit more, fixed the perfdata so it outputs in a sane format, and added rpcpassword option
Update 07/30/2010: The script has been redesigned so that it no longer requires the bitcoind binary, since it makes the JSON-RPC call directly. In order to get the current hashrate this plugin assumes you are running lachesis's getinfo patch. You can find the patch here:

Yes, it uses PHP but it works.

Latest as of 7/30/2010:

Old, deprecated script:

If you find this code useful, I accept donations at: 18jFGqFR53fEtaDg1DvRy1vWid9M2EVW1V  Grin
Jump to: