Bitcoin Forum
May 08, 2024, 03:16:55 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: I Wrote A Nagios Plugin For Bitcoin  (Read 9516 times)
aceat64 (OP)
Full Member
***
Offline Offline

Activity: 307
Merit: 102



View Profile
July 25, 2010, 09:40:45 AM
Last edit: July 30, 2010, 08:11:15 AM by aceat64
 #1

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: http://www.alloscomp.com/bitcoin/

Yes, it uses PHP but it works.

Latest as of 7/30/2010: http://pastebin.com/9iRSJWMr

Old, deprecated script: http://pastebin.com/ShDr80G2

If you find this code useful, I accept donations at: 18jFGqFR53fEtaDg1DvRy1vWid9M2EVW1V  Grin
"Governments are good at cutting off the heads of a centrally controlled networks like Napster, but pure P2P networks like Gnutella and Tor seem to be holding their own." -- Satoshi
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715181415
Hero Member
*
Offline Offline

Posts: 1715181415

View Profile Personal Message (Offline)

Ignore
1715181415
Reply with quote  #2

1715181415
Report to moderator
1715181415
Hero Member
*
Offline Offline

Posts: 1715181415

View Profile Personal Message (Offline)

Ignore
1715181415
Reply with quote  #2

1715181415
Report to moderator
Vasili Sviridov
Member
**
Offline Offline

Activity: 102
Merit: 10


View Profile WWW
July 25, 2010, 07:28:31 PM
 #2

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.

Code:
#!/bin/bash
case $1 in
        config)
                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
EOM
        exit 0;;
esac

#echo "balance.value" `bitcoind getbalance`
echo "blockcount.value" `bitcoind getblockcount`
#echo "difficulty.value" `bitcoind getdifficulty`

1JHYtsmsGq2McwGHmWayVjVtHds8rp1R5
aceat64 (OP)
Full Member
***
Offline Offline

Activity: 307
Merit: 102



View Profile
July 28, 2010, 04:38:26 AM
 #3

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.
Coma
Full Member
***
Offline Offline

Activity: 140
Merit: 100


View Profile
June 16, 2011, 04:59:08 PM
 #4

I care, I'm looking for something like this and will try it out soon.
Nobody else uses it? How weird...
mckoss
Newbie
*
Offline Offline

Activity: 52
Merit: 0



View Profile WWW
February 15, 2012, 09:52:41 AM
 #5

I wrote a Munin plugin for the getinfo data you might like to graph with Munin.

https://github.com/mckoss/contrib/blob/master/plugins/other/bitcoind_

https://i.imgur.com/fe3An.png

You can graph: wallet balance, peer connections, block number, and difficulty.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!