create account

Gridcoin network monitoring with cacti by sau412

View this thread on: hive.blogpeakd.comecency.com
· @sau412 ·
$7.81
Gridcoin network monitoring with cacti
# Introduction
Sometimes you want to know if something interesting happens in Gridcoin network. Here is instruction how to create graphs for interesting parameters with cacti. It will be looks like that:
![](https://cdn.steemitimages.com/DQmTGtaXVwznK9uu4VYJvVd6yanYd2Kkc84zzgYRgaSGoq8/%D0%B8%D0%B7%D0%BE%D0%B1%D1%80%D0%B0%D0%B6%D0%B5%D0%BD%D0%B8%D0%B5.png)

# Requirements
* Gridcoin research client (RPC also possible)
* Linux, Apache, MySQL, php
* Cacti (sudo apt-get install cacti)
* Script get_gridcoin_info_cli.php from https://github.com/sau412/gridcoin_monitoring

# How to setup
## Script
Copy get_gridcoin_info_cli.php to your cacti scripts folder, for my ubuntu it is:
````
/usr/share/cacti/site/scripts/
````

And set your gridcoin folder variable in get_gridcoin_info_cli.php. Also your gridcoin folder should be accessible for user www-data.

## Cacti
Cacti is RRDTool-based Graphing Solution. In simple words it can draw graphs. Usually it draw interface load, CPU load, user count. Now we add Gridcoin network stats here.
### Adding data input
* Data collection -> Data input methods
* Click 'New' (or plus in right top corner)
* Name 'Get gridcoin network info'
* Input type Script/Command
* Command 'php <path_cacti>/get_gridcoin_info.php'
* Click 'Save'
* Add output fields: 'blocks', 'diff', 'moneysupply', 'netgrcweight' with friendly names

### Adding data source template
* Templates -> New (or plus in right top corner)
* Name 'Gridcoin - Blocks'
* Data input method 'Get gridcoin network info'
* Data source type 'GAUGE' for difficulty and net weight, 'COUNTER' for blocks and money supply.
* Internal Data Source Name 'blocks'
* Click 'Create'
* Set 'Output field' to 'blocks'
* Click 'Save'
* Create data sources for 'diff', 'moneysupply', 'netgrcweight' is the same way

### Adding graph template
* Templates -> Graph
* Set name 'Gridcoin - Blocks'
* Set title 'Gridcoin - Blocks'
* Click 'Create'
* Add Graph Template Items on the top
* Set data source 'Gridcoin - Blocks'
* Set color, line or area you want
* Click 'Create'
* Create grapth templates for 'diff', 'moneysupply', 'netgrcweight' is the same way

### Adding graphs
* Create -> New graphs
* Select 'Gridcoin - Blocks' and click 'Create'
* Select 'Gridcoin - Difficulty' and click 'Create'
* Select 'Gridcoin - Money supply' and click 'Create'
* Select 'Gridcoin - Net weight' and click 'Create'
Done.

### View graphs
Open 'Graphs' tap on the top. After 10-20 minutes first strokes should appear on the graphs. In day or two you can open 'Graphs' tab to view your pretty graphs:
![](https://cdn.steemitimages.com/DQmdvaEzRHY9EkZQ3jLZ32EggixN3RuA9bPfZWngASaW9xb/%D0%B8%D0%B7%D0%BE%D0%B1%D1%80%D0%B0%D0%B6%D0%B5%D0%BD%D0%B8%D0%B5.png)

Notes:
* Money supply currently not changing. I don't know what exactly it means.
* In blocks graph you see milliblocks per second:)

That's all! Thanks for reading.
___
<p><div class="pull-right">https://steemitimages.com/DQmNSv5FPKWmoZdEgF3GuvNpwAxueoaWZDFv7a48HPpc8WJ/image.png</div><strong><a href="http://gridcoin.us/">Gridcoin</a></strong> is an open source <a href="https://en.wikipedia.org/wiki/Cryptocurrency">cryptocurrency</a> (Ticker: GRC) which securely rewards volunteer computing performed upon the <a href="https://boinc.berkeley.edu/">BOINC platform</a> in a decentralized manner on top of <a href="http://wiki.gridcoin.us/Proof-of-Research#Proof-of-Stake">proof of stake</a>.</p>
<p><div class="pull-left">https://steemitimages.com/DQmT2Q7sjXJgyUMRZK78HMztDkzzVZrYu14MzacW9nZj665/image.png</div><strong><a href="https://boinc.berkeley.edu/">BOINC</a></strong> (Berkeley Open Infrastructure for Network Computing) is a distributed Internet platform launched beginning of 2002 and rewards participants with credits for performed work. BOINC is an application available for multiple Operating Systems and utilises the unused CPU and GPU cycles on computers to perform scientific work.</p>
👍  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
properties (23)
authorsau412
permlinkgridcoin-network-monitoring-with-cacti
categorygridcoin
json_metadata{"tags":["gridcoin","monitoring","instructions","cacti"],"image":["https://cdn.steemitimages.com/DQmTGtaXVwznK9uu4VYJvVd6yanYd2Kkc84zzgYRgaSGoq8/%D0%B8%D0%B7%D0%BE%D0%B1%D1%80%D0%B0%D0%B6%D0%B5%D0%BD%D0%B8%D0%B5.png","https://cdn.steemitimages.com/DQmdvaEzRHY9EkZQ3jLZ32EggixN3RuA9bPfZWngASaW9xb/%D0%B8%D0%B7%D0%BE%D0%B1%D1%80%D0%B0%D0%B6%D0%B5%D0%BD%D0%B8%D0%B5.png","https://steemitimages.com/DQmNSv5FPKWmoZdEgF3GuvNpwAxueoaWZDFv7a48HPpc8WJ/image.png","https://steemitimages.com/DQmT2Q7sjXJgyUMRZK78HMztDkzzVZrYu14MzacW9nZj665/image.png"],"links":["https://github.com/sau412/gridcoin_monitoring","http://gridcoin.us/","https://en.wikipedia.org/wiki/Cryptocurrency","https://boinc.berkeley.edu/","http://wiki.gridcoin.us/Proof-of-Research#Proof-of-Stake"],"app":"steemit/0.1","format":"markdown"}
created2018-08-27 10:29:54
last_update2018-08-27 10:29:54
depth0
children2
last_payout2018-09-03 10:29:54
cashout_time1969-12-31 23:59:59
total_payout_value5.934 HBD
curator_payout_value1.873 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length3,928
author_reputation8,198,119,818,978
root_title"Gridcoin network monitoring with cacti"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id69,489,634
net_rshares5,238,957,532,025
author_curate_reward""
vote details (40)
@cm-steem ·
$0.03
Very cool! Have you checked out the old [gridcoin netdata](https://github.com/grctest/GRC-Netdata) implementation? It needs uplifting, but can serve as a simple real-time gridcoin blockchain explorer that users can run alongside their nodes.
👍  , , , ,
properties (23)
authorcm-steem
permlinkre-sau412-gridcoin-network-monitoring-with-cacti-20180827t112910508z
categorygridcoin
json_metadata{"tags":["gridcoin"],"links":["https://github.com/grctest/GRC-Netdata"],"app":"steemit/0.1"}
created2018-08-27 11:29:12
last_update2018-08-27 11:29:12
depth1
children1
last_payout2018-09-03 11:29:12
cashout_time1969-12-31 23:59:59
total_payout_value0.026 HBD
curator_payout_value0.002 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length241
author_reputation58,522,774,254,119
root_title"Gridcoin network monitoring with cacti"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id69,493,384
net_rshares19,951,022,796
author_curate_reward""
vote details (5)
@sau412 ·
Nice project, added to bookmarks
properties (22)
authorsau412
permlinkre-cm-steem-re-sau412-gridcoin-network-monitoring-with-cacti-20180827t115439022z
categorygridcoin
json_metadata{"tags":["gridcoin"],"app":"steemit/0.1"}
created2018-08-27 11:54:39
last_update2018-08-27 11:54:39
depth2
children0
last_payout2018-09-03 11:54:39
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length32
author_reputation8,198,119,818,978
root_title"Gridcoin network monitoring with cacti"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id69,495,043
net_rshares0