Skip to content

Instantly share code, notes, and snippets.

@JackyWYX
Last active June 11, 2021 01:58
Show Gist options
  • Save JackyWYX/a621db9fc19942c6ba042340f5beda26 to your computer and use it in GitHub Desktop.
Save JackyWYX/a621db9fc19942c6ba042340f5beda26 to your computer and use it in GitHub Desktop.
A complete prometheus metrics for ddos protection
> curl localhost:9900/metrics
# HELP hmy_consensus_blskeys list of bls pubkey
# TYPE hmy_consensus_blskeys gauge
hmy_consensus_blskeys{index="0",pubkey="000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"} 0
# HELP hmy_consensus_finality the latency of the finality
# TYPE hmy_consensus_finality histogram
hmy_consensus_finality_bucket{le="800"} 0
hmy_consensus_finality_bucket{le="1000"} 0
hmy_consensus_finality_bucket{le="1250"} 0
hmy_consensus_finality_bucket{le="1562.5"} 0
hmy_consensus_finality_bucket{le="1953.125"} 0
hmy_consensus_finality_bucket{le="2441.40625"} 0
hmy_consensus_finality_bucket{le="3051.7578125"} 0
hmy_consensus_finality_bucket{le="3814.697265625"} 0
hmy_consensus_finality_bucket{le="4768.37158203125"} 0
hmy_consensus_finality_bucket{le="5960.4644775390625"} 0
hmy_consensus_finality_bucket{le="+Inf"} 0
hmy_consensus_finality_sum 0
hmy_consensus_finality_count 0
# HELP hmy_downloader_num_blocks_inserted_beacon_helper number of blocks inserted from beacon helper
# TYPE hmy_downloader_num_blocks_inserted_beacon_helper counter
hmy_downloader_num_blocks_inserted_beacon_helper 0
# HELP hmy_node_metadata a list of node metadata
# TYPE hmy_node_metadata counter
hmy_node_metadata{key="peerid",value="QmTGh5UeGE2EqoEYz3pDKbE1nRSCho3yu4aZBWaCH4VwQ2"} 1
hmy_node_metadata{key="version",value="Harmony (C) 2020. harmony, version v7091-v2.1.9-1015-gac6685eb (yx@ 2021-06-11T01:31:06+0000)"} 1
# HELP hmy_p2p_consensus_msg number of consensus messages
# TYPE hmy_p2p_consensus_msg counter
hmy_p2p_consensus_msg{type="ignored"} 1365
hmy_p2p_consensus_msg{type="valid"} 14
# HELP hmy_p2p_message number of p2p messages
# TYPE hmy_p2p_message counter
hmy_p2p_message{type="consensus_total"} 1379
hmy_p2p_message{type="node_total"} 18927
hmy_p2p_message{type="total"} 943516
# HELP hmy_p2p_node_msg number of node messages
# TYPE hmy_p2p_node_msg counter
hmy_p2p_node_msg{type="block_sync"} 12372
hmy_p2p_node_msg{type="crosslink"} 6370
hmy_p2p_node_msg{type="staking_tx"} 1
hmy_p2p_node_msg{type="tx"} 184
# HELP hmy_p2p_rate_blacklisted number of pub-sub message rejected and dropped since the sender is blacklisted
# TYPE hmy_p2p_rate_blacklisted counter
hmy_p2p_rate_blacklisted{topic="harmony/0.0.1/client/beacon"} 381622
hmy_p2p_rate_blacklisted{topic="harmony/0.0.1/node/beacon"} 541272
# HELP hmy_p2p_rate_limited_msg number of pub-sub message rejected and dropped due to rate limit
# TYPE hmy_p2p_rate_limited_msg counter
hmy_p2p_rate_limited_msg{topic="harmony/0.0.1/client/beacon"} 148
hmy_p2p_rate_limited_msg{topic="harmony/0.0.1/node/beacon"} 168
# HELP hmy_rpc_over_ratelimit number of times triggered rpc rate limit
# TYPE hmy_rpc_over_ratelimit counter
hmy_rpc_over_ratelimit{rate_limit="1000"} 9
# HELP hmy_stream_bytes_read total bytes read from stream
# TYPE hmy_stream_bytes_read counter
hmy_stream_bytes_read 0
# HELP hmy_stream_bytes_write total bytes write to stream
# TYPE hmy_stream_bytes_write counter
hmy_stream_bytes_write 0
# HELP hmy_stream_msg_read number of messages read from stream
# TYPE hmy_stream_msg_read counter
hmy_stream_msg_read 0
# HELP hmy_stream_msg_write number of messages write to stream
# TYPE hmy_stream_msg_write counter
hmy_stream_msg_write 0
# HELP hmy_stream_num_server_request number of incoming requests as server
# TYPE hmy_stream_num_server_request counter
hmy_stream_num_server_request 0
# HELP hmy_stream_server_request_delay delay in seconds of incoming requests of server
# TYPE hmy_stream_server_request_delay histogram
hmy_stream_server_request_delay_bucket{le="0.01"} 0
hmy_stream_server_request_delay_bucket{le="0.02"} 0
hmy_stream_server_request_delay_bucket{le="0.04"} 0
hmy_stream_server_request_delay_bucket{le="0.08"} 0
hmy_stream_server_request_delay_bucket{le="0.16"} 0
hmy_stream_server_request_delay_bucket{le="+Inf"} 0
hmy_stream_server_request_delay_sum 0
hmy_stream_server_request_delay_count 0
# HELP promhttp_metric_handler_requests_in_flight Current number of scrapes being served.
# TYPE promhttp_metric_handler_requests_in_flight gauge
promhttp_metric_handler_requests_in_flight 1
# HELP promhttp_metric_handler_requests_total Total number of scrapes by HTTP status code.
# TYPE promhttp_metric_handler_requests_total counter
promhttp_metric_handler_requests_total{code="200"} 0
promhttp_metric_handler_requests_total{code="500"} 0
promhttp_metric_handler_requests_total{code="503"} 0
> curl localhost:9900/metrics
# HELP hmy_consensus_bingo counter of consensus
# TYPE hmy_consensus_bingo counter
hmy_consensus_bingo{consensus="bingo"} 3143
hmy_consensus_bingo{consensus="signatures"} 6282
# HELP hmy_consensus_blskeys list of bls pubkey
# TYPE hmy_consensus_blskeys gauge
hmy_consensus_blskeys{index="0",pubkey="8c95e04a4826d4d80ef16183f13aa5d14eb3c96d2755407e15c440bb4edd6e4636a82e47975385c6223ba24759561103"} 0
hmy_consensus_blskeys{index="1",pubkey="e7f54994bc5c02edeeb178ce2d34db276a893bab5c59ac3d7eb9f077c893f9e31171de6236ba0e21be415d8631e45b91"} 1
# HELP hmy_consensus_finality the latency of the finality
# TYPE hmy_consensus_finality histogram
hmy_consensus_finality_bucket{le="800"} 3143
hmy_consensus_finality_bucket{le="1000"} 3143
hmy_consensus_finality_bucket{le="1250"} 3143
hmy_consensus_finality_bucket{le="1562.5"} 3143
hmy_consensus_finality_bucket{le="1953.125"} 3143
hmy_consensus_finality_bucket{le="2441.40625"} 3143
hmy_consensus_finality_bucket{le="3051.7578125"} 3143
hmy_consensus_finality_bucket{le="3814.697265625"} 3143
hmy_consensus_finality_bucket{le="4768.37158203125"} 3143
hmy_consensus_finality_bucket{le="5960.4644775390625"} 3143
hmy_consensus_finality_bucket{le="+Inf"} 3143
hmy_consensus_finality_sum 1.046244e+06
hmy_consensus_finality_count 3143
# HELP hmy_consensus_signatures number of signatures or commits
# TYPE hmy_consensus_signatures gauge
hmy_consensus_signatures{consensus="block_num"} 1.0816529e+07
hmy_consensus_signatures{consensus="signatures"} 2
# HELP hmy_consensus_sync counter of blockchain syncing state
# TYPE hmy_consensus_sync counter
hmy_consensus_sync{consensus="in_sync"} 1
hmy_consensus_sync{consensus="out_of_sync"} 1
# HELP hmy_downloader_num_blocks_inserted_beacon_helper number of blocks inserted from beacon helper
# TYPE hmy_downloader_num_blocks_inserted_beacon_helper counter
hmy_downloader_num_blocks_inserted_beacon_helper 0
# HELP hmy_node_metadata a list of node metadata
# TYPE hmy_node_metadata counter
hmy_node_metadata{key="peerid",value="QmNRMMhYChDGU53f7oX1BEsnetrmN9Put5RNVvfEho2X4K"} 1
hmy_node_metadata{key="version",value="Harmony (C) 2020. harmony, version v7089-v3.1.4-167-g261d2aa4 (yx@ 2021-06-11T00:06:20+0000)"} 1
# HELP hmy_p2p_consensus_msg number of consensus messages
# TYPE hmy_p2p_consensus_msg counter
hmy_p2p_consensus_msg{type="ignored"} 51090
hmy_p2p_consensus_msg{type="valid"} 9435
# HELP hmy_p2p_message number of p2p messages
# TYPE hmy_p2p_message counter
hmy_p2p_message{type="consensus_total"} 60525
hmy_p2p_message{type="node_total"} 13859
hmy_p2p_message{type="total"} 74384
# HELP hmy_p2p_node_msg number of node messages
# TYPE hmy_p2p_node_msg counter
hmy_p2p_node_msg{type="block_sync"} 3274
hmy_p2p_node_msg{type="crosslink"} 10561
hmy_p2p_node_msg{type="tx"} 24
# HELP hmy_stream_bytes_read total bytes read from stream
# TYPE hmy_stream_bytes_read counter
hmy_stream_bytes_read 0
# HELP hmy_stream_bytes_write total bytes write to stream
# TYPE hmy_stream_bytes_write counter
hmy_stream_bytes_write 0
# HELP hmy_stream_msg_read number of messages read from stream
# TYPE hmy_stream_msg_read counter
hmy_stream_msg_read 0
# HELP hmy_stream_msg_write number of messages write to stream
# TYPE hmy_stream_msg_write counter
hmy_stream_msg_write 0
# HELP hmy_stream_num_server_request number of incoming requests as server
# TYPE hmy_stream_num_server_request counter
hmy_stream_num_server_request 0
# HELP hmy_stream_server_request_delay delay in seconds of incoming requests of server
# TYPE hmy_stream_server_request_delay histogram
hmy_stream_server_request_delay_bucket{le="0.01"} 0
hmy_stream_server_request_delay_bucket{le="0.02"} 0
hmy_stream_server_request_delay_bucket{le="0.04"} 0
hmy_stream_server_request_delay_bucket{le="0.08"} 0
hmy_stream_server_request_delay_bucket{le="0.16"} 0
hmy_stream_server_request_delay_bucket{le="+Inf"} 0
hmy_stream_server_request_delay_sum 0
hmy_stream_server_request_delay_count 0
# HELP promhttp_metric_handler_requests_in_flight Current number of scrapes being served.
# TYPE promhttp_metric_handler_requests_in_flight gauge
promhttp_metric_handler_requests_in_flight 1
# HELP promhttp_metric_handler_requests_total Total number of scrapes by HTTP status code.
# TYPE promhttp_metric_handler_requests_total counter
promhttp_metric_handler_requests_total{code="200"} 9
promhttp_metric_handler_requests_total{code="500"} 0
promhttp_metric_handler_requests_total{code="503"} 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment