Skip to content
Snippets Groups Projects
Unverified Commit e7c0236b authored by Levente Pap's avatar Levente Pap Committed by GitHub
Browse files

Sync Debug Metrics/Tools (#646)

* Get message requester queue size

* New metric MessageRequestQueueSize

* Add Prometheus exporter for MessageRequestQueueSize

* Fix msgRequester metrics measurement

* Update local_dashboard with msgRequestQueueSize panel

* Add DBStats method to msg layer tangle

* Measure DBStats in metrics plugin, report via Prometheus

* :chart_with_upwards_trend: Add "Messages in DB" chart to local grafana dashboard

* Fix DBStats method

* Refactor DBStats metrics collection, update default params

* print DBStats() func ints

* Compare iterative and incremental DBStat data collection

* Add messageCount and solidMessageCOunt to /info webapi endpoint

* Cleanup metrics and prometheus plugin

* Update /info webapi data collection

* Fix too many relases in message tange

* Small fixes

* FIx avgSolidificationTime metrics

* Fix avgSolidificationTime calc

* :chart_with_upwards_trend: "Add Average Solidificaiton Time" Chart to Grafana Dashboard

* Restore metrics plugin parameters

* :lipstick: Add synced status to node dashboard

* Make scheduledRequestsMutex a RWMutex

* Add client lib tool for past cone exist verification

* Update local_dahboard for docker-network

* :sparkles: Introduce tools endpoint for webapi

 - disabled by deafult
 - contains utility api-s, e.g., "tools/pastcone" that given
   a message ID, checks if all messages in the past cone are
   present in DB down to genesis
 - Add PastConeExist() client api method

* Get rid of debug prints

* Small fixes

* :lipstick:

 Update grafana dashboards

* Update client/tools.go

Co-authored-by: default avatarJonas Theis <mail@jonastheis.de>

* PR review updates

* Remove unused variable in metrics/message

Co-authored-by: default avatarLuca Moser <moser.luca@gmail.com>
Co-authored-by: default avatarJonas Theis <mail@jonastheis.de>
parent f5bfc7f7
No related branches found
No related tags found
No related merge requests found
Showing
with 1063 additions and 153 deletions
package client
import (
"errors"
"net/http"
webapi_tools "github.com/iotaledger/goshimmer/plugins/webapi/tools"
)
const (
routePastCone = "tools/pastcone"
)
// PastConeExist checks that all of the messages in the past cone of a message are existing on the node
// down to the genesis. Returns the number of messages in the past cone as well.
func (api *GoShimmerAPI) PastConeExist(base58EncodedMessageID string) (*webapi_tools.PastConeResponse, error) {
res := &webapi_tools.PastConeResponse{}
if err := api.do(
http.MethodGet,
routePastCone,
&webapi_tools.PastConeRequest{ID: base58EncodedMessageID},
res,
); err != nil {
return nil, err
}
if res.Error != "" {
return res, errors.New(res.Error)
}
return res, nil
}
...@@ -14,7 +14,7 @@ type MessageRequester struct { ...@@ -14,7 +14,7 @@ type MessageRequester struct {
options *Options options *Options
Events Events Events Events
scheduledRequestsMutex sync.Mutex scheduledRequestsMutex sync.RWMutex
} }
// New creates a new message requester. // New creates a new message requester.
...@@ -69,3 +69,10 @@ func (requester *MessageRequester) reRequest(id message.Id) { ...@@ -69,3 +69,10 @@ func (requester *MessageRequester) reRequest(id message.Id) {
requester.scheduledRequests[id] = time.AfterFunc(requester.options.retryInterval, func() { requester.reRequest(id) }) requester.scheduledRequests[id] = time.AfterFunc(requester.options.retryInterval, func() { requester.reRequest(id) })
} }
} }
// RequestQueueSize returns the number of scheduled message requests.
func (requester *MessageRequester) RequestQueueSize() int {
requester.scheduledRequestsMutex.RLock()
defer requester.scheduledRequestsMutex.RUnlock()
return len(requester.scheduledRequests)
}
...@@ -135,6 +135,27 @@ func (tangle *Tangle) Prune() error { ...@@ -135,6 +135,27 @@ func (tangle *Tangle) Prune() error {
return nil return nil
} }
// DBStats returns the number of solid messages and total number of messages in the database, furthermore the average time it takes to solidify messages.
func (tangle *Tangle) DBStats() (solidCount int, messageCount int, avgSolidificationTime float64) {
var sumSolidificationTime time.Duration
tangle.messageMetadataStorage.ForEach(func(key []byte, cachedObject objectstorage.CachedObject) bool {
cachedObject.Consume(func(object objectstorage.StorableObject) {
msgMetaData := object.(*MessageMetadata)
messageCount++
received := msgMetaData.ReceivedTime()
if msgMetaData.IsSolid() {
solidCount++
sumSolidificationTime += msgMetaData.solidificationTime.Sub(received)
}
})
return true
})
if solidCount > 0 {
avgSolidificationTime = float64(sumSolidificationTime.Milliseconds()) / float64(solidCount)
}
return
}
// worker that stores the message and calls the corresponding storage events. // worker that stores the message and calls the corresponding storage events.
func (tangle *Tangle) storeMessageWorker(msg *message.Message) { func (tangle *Tangle) storeMessageWorker(msg *message.Message) {
// store message // store message
......
...@@ -10,6 +10,7 @@ import ( ...@@ -10,6 +10,7 @@ import (
"github.com/iotaledger/goshimmer/plugins/webapi/info" "github.com/iotaledger/goshimmer/plugins/webapi/info"
"github.com/iotaledger/goshimmer/plugins/webapi/message" "github.com/iotaledger/goshimmer/plugins/webapi/message"
"github.com/iotaledger/goshimmer/plugins/webapi/spammer" "github.com/iotaledger/goshimmer/plugins/webapi/spammer"
"github.com/iotaledger/goshimmer/plugins/webapi/tools"
"github.com/iotaledger/goshimmer/plugins/webapi/value" "github.com/iotaledger/goshimmer/plugins/webapi/value"
"github.com/iotaledger/goshimmer/plugins/webauth" "github.com/iotaledger/goshimmer/plugins/webauth"
"github.com/iotaledger/hive.go/node" "github.com/iotaledger/hive.go/node"
...@@ -27,4 +28,5 @@ var PLUGINS = node.Plugins( ...@@ -27,4 +28,5 @@ var PLUGINS = node.Plugins(
autopeering.Plugin(), autopeering.Plugin(),
info.Plugin(), info.Plugin(),
value.Plugin(), value.Plugin(),
tools.Plugin(),
) )
...@@ -4,6 +4,7 @@ import Row from "react-bootstrap/Row"; ...@@ -4,6 +4,7 @@ import Row from "react-bootstrap/Row";
import Col from "react-bootstrap/Col"; import Col from "react-bootstrap/Col";
import Uptime from "app/components/Uptime"; import Uptime from "app/components/Uptime";
import Version from "app/components/Version"; import Version from "app/components/Version";
import Synced from "app/components/Synced";
import MPSChart from "app/components/MPSChart"; import MPSChart from "app/components/MPSChart";
import TipsChart from "app/components/TipsChart"; import TipsChart from "app/components/TipsChart";
import NodeStore from "app/stores/NodeStore"; import NodeStore from "app/stores/NodeStore";
...@@ -39,6 +40,11 @@ export class Dashboard extends React.Component<Props, any> { ...@@ -39,6 +40,11 @@ export class Dashboard extends React.Component<Props, any> {
<ListGroup.Item><Version/></ListGroup.Item> <ListGroup.Item><Version/></ListGroup.Item>
</ListGroup> </ListGroup>
</Col> </Col>
<Col>
<ListGroup variant={"flush"}>
<ListGroup.Item><Synced/></ListGroup.Item>
</ListGroup>
</Col>
</Row> </Row>
</Card.Body> </Card.Body>
</Card> </Card>
......
import * as React from 'react';
import NodeStore from "app/stores/NodeStore";
import {inject, observer} from "mobx-react";
interface Props {
nodeStore?: NodeStore;
}
@inject("nodeStore")
@observer
export default class Synced extends React.Component<Props, any> {
render() {
return (
<React.Fragment>
Synced: {this.props.nodeStore.status.synced? "Yes":"No"}
</React.Fragment>
);
}
}
...@@ -11,6 +11,7 @@ class Status { ...@@ -11,6 +11,7 @@ class Status {
id: string; id: string;
version: string; version: string;
uptime: number; uptime: number;
synced: boolean;
mem: MemoryMetrics = new MemoryMetrics(); mem: MemoryMetrics = new MemoryMetrics();
} }
......
Source diff could not be displayed: it is too large. Options to address this: view the blob.
...@@ -166,6 +166,7 @@ type nodestatus struct { ...@@ -166,6 +166,7 @@ type nodestatus struct {
ID string `json:"id"` ID string `json:"id"`
Version string `json:"version"` Version string `json:"version"`
Uptime int64 `json:"uptime"` Uptime int64 `json:"uptime"`
Synced bool `json:"synced"`
Mem *memmetrics `json:"mem"` Mem *memmetrics `json:"mem"`
} }
...@@ -232,6 +233,7 @@ func currentNodeStatus() *nodestatus { ...@@ -232,6 +233,7 @@ func currentNodeStatus() *nodestatus {
// node status // node status
status.Version = banner.AppVersion status.Version = banner.AppVersion
status.Uptime = time.Since(nodeStartAt).Milliseconds() status.Uptime = time.Since(nodeStartAt).Milliseconds()
status.Synced = metrics.Synced()
// memory metrics // memory metrics
status.Mem = &memmetrics{ status.Mem = &memmetrics{
......
package metrics package metrics
import ( import (
"time"
"github.com/iotaledger/goshimmer/packages/binary/messagelayer/payload" "github.com/iotaledger/goshimmer/packages/binary/messagelayer/payload"
"github.com/iotaledger/goshimmer/packages/metrics" "github.com/iotaledger/goshimmer/packages/metrics"
"github.com/iotaledger/goshimmer/plugins/messagelayer" "github.com/iotaledger/goshimmer/plugins/messagelayer"
...@@ -12,6 +14,25 @@ var ( ...@@ -12,6 +14,25 @@ var (
// Total number of processed messages since start of the node. // Total number of processed messages since start of the node.
messageTotalCount atomic.Uint64 messageTotalCount atomic.Uint64
// number of messages in the database at startup
initialMessageTotalCountDB uint64
// current number of messages in the node's database
messageTotalCountDB atomic.Uint64
// number of solid messages in the database at startup
initialMessageSolidCountDB uint64
// current number of solid messages in the node's database
messageSolidCountDBInc atomic.Uint64
// helper variable that is only calculated at init phase. unit is milliseconds!
initialSumSolidificationTime float64
// sum of solidification time (since start of the node)
sumSolidificationTime time.Duration
solidTimeMutex syncutils.RWMutex
// current number of message tips. // current number of message tips.
messageTips atomic.Uint64 messageTips atomic.Uint64
...@@ -26,17 +47,20 @@ var ( ...@@ -26,17 +47,20 @@ var (
// protect map from concurrent read/write. // protect map from concurrent read/write.
messageCountPerPayloadMutex syncutils.RWMutex messageCountPerPayloadMutex syncutils.RWMutex
// number of messages being requested by the message layer.
requestQueueSize atomic.Int64
) )
////// Exported functions to obtain metrics from outside ////// ////// Exported functions to obtain metrics from outside //////
// MessageTotalCount returns the total number of messages seen since the start of the node. // MessageTotalCountSinceStart returns the total number of messages seen since the start of the node.
func MessageTotalCount() uint64 { func MessageTotalCountSinceStart() uint64 {
return messageTotalCount.Load() return messageTotalCount.Load()
} }
// MessageCountPerPayload returns a map of message payload types and their count since the start of the node. // MessageCountSinceStartPerPayload returns a map of message payload types and their count since the start of the node.
func MessageCountPerPayload() map[payload.Type]uint64 { func MessageCountSinceStartPerPayload() map[payload.Type]uint64 {
messageCountPerPayloadMutex.RLock() messageCountPerPayloadMutex.RLock()
defer messageCountPerPayloadMutex.RUnlock() defer messageCountPerPayloadMutex.RUnlock()
...@@ -54,6 +78,37 @@ func MessageTips() uint64 { ...@@ -54,6 +78,37 @@ func MessageTips() uint64 {
return messageTips.Load() return messageTips.Load()
} }
// MessageRequestQueueSize returns the number of message requests the node currently has registered.
func MessageRequestQueueSize() int64 {
return requestQueueSize.Load()
}
// MessageSolidCountDB returns the number of messages that are solid in the DB.
func MessageSolidCountDB() uint64 {
return initialMessageSolidCountDB + messageSolidCountDBInc.Load()
}
// MessageTotalCountDB returns the number of messages that are stored in the DB.
func MessageTotalCountDB() uint64 {
return initialMessageTotalCountDB + messageTotalCountDB.Load()
}
// AvgSolidificationTime returns the average time it takes for a message to become solid. [milliseconds]
func AvgSolidificationTime() (result float64) {
solidTimeMutex.RLock()
defer solidTimeMutex.RUnlock()
totalSolid := MessageSolidCountDB()
if totalSolid > 0 {
result = (initialSumSolidificationTime + float64(sumSolidificationTime.Milliseconds())) / float64(totalSolid)
}
return
}
// ReceivedMessagesPerSecond retrieves the current messages per second number.
func ReceivedMessagesPerSecond() uint64 {
return measuredReceivedMPS.Load()
}
////// Handling data updates and measuring ////// ////// Handling data updates and measuring //////
func increasePerPayloadCounter(p payload.Type) { func increasePerPayloadCounter(p payload.Type) {
...@@ -69,11 +124,6 @@ func measureMessageTips() { ...@@ -69,11 +124,6 @@ func measureMessageTips() {
metrics.Events().MessageTips.Trigger((uint64)(messagelayer.TipSelector().TipCount())) metrics.Events().MessageTips.Trigger((uint64)(messagelayer.TipSelector().TipCount()))
} }
// ReceivedMessagesPerSecond retrieves the current messages per second number.
func ReceivedMessagesPerSecond() uint64 {
return measuredReceivedMPS.Load()
}
// increases the received MPS counter // increases the received MPS counter
func increaseReceivedMPSCounter() { func increaseReceivedMPSCounter() {
mpsReceivedSinceLastMeasurement.Inc() mpsReceivedSinceLastMeasurement.Inc()
...@@ -93,3 +143,15 @@ func measureReceivedMPS() { ...@@ -93,3 +143,15 @@ func measureReceivedMPS() {
// trigger events for outside listeners // trigger events for outside listeners
Events.ReceivedMPSUpdated.Trigger(sampledMPS) Events.ReceivedMPSUpdated.Trigger(sampledMPS)
} }
func measureRequestQueueSize() {
size := int64(messagelayer.MessageRequester().RequestQueueSize())
requestQueueSize.Store(size)
}
func measureInitialDBStats() {
solid, total, avgSolidTime := messagelayer.Tangle().DBStats()
initialMessageSolidCountDB = uint64(solid)
initialMessageTotalCountDB = uint64(total)
initialSumSolidificationTime = avgSolidTime * float64(solid)
}
...@@ -15,19 +15,19 @@ import ( ...@@ -15,19 +15,19 @@ import (
func TestMessageCountPerPayload(t *testing.T) { func TestMessageCountPerPayload(t *testing.T) {
// it is empty initially // it is empty initially
assert.Equal(t, MessageTotalCount(), (uint64)(0)) assert.Equal(t, MessageTotalCountSinceStart(), (uint64)(0))
// simulate attaching 10 value payloads in 0s < t < 1s // simulate attaching 10 value payloads in 0s < t < 1s
for i := 0; i < 10; i++ { for i := 0; i < 10; i++ {
increasePerPayloadCounter(valuepayload.Type) increasePerPayloadCounter(valuepayload.Type)
} }
assert.Equal(t, MessageTotalCount(), (uint64)(10)) assert.Equal(t, MessageTotalCountSinceStart(), (uint64)(10))
assert.Equal(t, MessageCountPerPayload(), map[payload.Type]uint64{valuepayload.Type: 10}) assert.Equal(t, MessageCountSinceStartPerPayload(), map[payload.Type]uint64{valuepayload.Type: 10})
// simulate attaching 5 drng payloads // simulate attaching 5 drng payloads
for i := 0; i < 5; i++ { for i := 0; i < 5; i++ {
increasePerPayloadCounter(drngpayload.Type) increasePerPayloadCounter(drngpayload.Type)
} }
assert.Equal(t, MessageTotalCount(), (uint64)(15)) assert.Equal(t, MessageTotalCountSinceStart(), (uint64)(15))
assert.Equal(t, MessageCountPerPayload(), map[payload.Type]uint64{valuepayload.Type: 10, drngpayload.Type: 5}) assert.Equal(t, MessageCountSinceStartPerPayload(), map[payload.Type]uint64{valuepayload.Type: 10, drngpayload.Type: 5})
} }
func TestMessageTips(t *testing.T) { func TestMessageTips(t *testing.T) {
......
...@@ -21,6 +21,7 @@ import ( ...@@ -21,6 +21,7 @@ import (
"github.com/iotaledger/hive.go/events" "github.com/iotaledger/hive.go/events"
"github.com/iotaledger/hive.go/logger" "github.com/iotaledger/hive.go/logger"
"github.com/iotaledger/hive.go/node" "github.com/iotaledger/hive.go/node"
"github.com/iotaledger/hive.go/objectstorage"
"github.com/iotaledger/hive.go/timeutil" "github.com/iotaledger/hive.go/timeutil"
) )
...@@ -47,8 +48,10 @@ func configure(_ *node.Plugin) { ...@@ -47,8 +48,10 @@ func configure(_ *node.Plugin) {
} }
func run(_ *node.Plugin) { func run(_ *node.Plugin) {
log.Infof("Starting %s ...", PluginName)
if config.Node().GetBool(CfgMetricsLocal) { if config.Node().GetBool(CfgMetricsLocal) {
// initial measurement, since we have to know how many messages are there in the db
measureInitialDBStats()
registerLocalMetrics() registerLocalMetrics()
} }
...@@ -59,6 +62,7 @@ func run(_ *node.Plugin) { ...@@ -59,6 +62,7 @@ func run(_ *node.Plugin) {
// create a background worker that update the metrics every second // create a background worker that update the metrics every second
if err := daemon.BackgroundWorker("Metrics Updater", func(shutdownSignal <-chan struct{}) { if err := daemon.BackgroundWorker("Metrics Updater", func(shutdownSignal <-chan struct{}) {
defer log.Infof("Stopping Metrics Updater ... done")
if config.Node().GetBool(CfgMetricsLocal) { if config.Node().GetBool(CfgMetricsLocal) {
timeutil.Ticker(func() { timeutil.Ticker(func() {
measureCPUUsage() measureCPUUsage()
...@@ -67,6 +71,7 @@ func run(_ *node.Plugin) { ...@@ -67,6 +71,7 @@ func run(_ *node.Plugin) {
measureMessageTips() measureMessageTips()
measureValueTips() measureValueTips()
measureReceivedMPS() measureReceivedMPS()
measureRequestQueueSize()
// gossip network traffic // gossip network traffic
g := gossipCurrentTraffic() g := gossipCurrentTraffic()
...@@ -77,7 +82,7 @@ func run(_ *node.Plugin) { ...@@ -77,7 +82,7 @@ func run(_ *node.Plugin) {
if config.Node().GetBool(CfgMetricsGlobal) { if config.Node().GetBool(CfgMetricsGlobal) {
timeutil.Ticker(calculateNetworkDiameter, 1*time.Minute, shutdownSignal) timeutil.Ticker(calculateNetworkDiameter, 1*time.Minute, shutdownSignal)
} }
log.Infof("Stopping Metrics Updater ...")
}, shutdown.PriorityMetrics); err != nil { }, shutdown.PriorityMetrics); err != nil {
log.Panicf("Failed to start as daemon: %s", err) log.Panicf("Failed to start as daemon: %s", err)
} }
...@@ -93,6 +98,29 @@ func registerLocalMetrics() { ...@@ -93,6 +98,29 @@ func registerLocalMetrics() {
cachedMessageMetadata.Release() cachedMessageMetadata.Release()
increaseReceivedMPSCounter() increaseReceivedMPSCounter()
increasePerPayloadCounter(_payloadType) increasePerPayloadCounter(_payloadType)
// MessageAttached is triggered in storeMessageWorker that saves the msg to database
messageTotalCountDB.Inc()
}))
messagelayer.Tangle().Events.MessageRemoved.Attach(events.NewClosure(func(messageId message.Id) {
// MessageRemoved triggered when the message gets removed from database.
messageTotalCountDB.Dec()
}))
// messages can only become solid once, then they stay like that, hence no .Dec() part
messagelayer.Tangle().Events.MessageSolid.Attach(events.NewClosure(func(cachedMessage *message.CachedMessage, cachedMessageMetadata *tangle.CachedMessageMetadata) {
cachedMessage.Release()
solidTimeMutex.Lock()
defer solidTimeMutex.Unlock()
// Consume should release cachedMessageMetadata
cachedMessageMetadata.Consume(func(object objectstorage.StorableObject) {
msgMetaData := object.(*tangle.MessageMetadata)
if msgMetaData.IsSolid() {
messageSolidCountDBInc.Inc()
sumSolidificationTime += msgMetaData.SolidificationTime().Sub(msgMetaData.ReceivedTime())
}
})
})) }))
// Value payload attached // Value payload attached
......
...@@ -7,9 +7,13 @@ import ( ...@@ -7,9 +7,13 @@ import (
) )
var ( var (
messageTips prometheus.Gauge messageTips prometheus.Gauge
messagePerTypeCount *prometheus.GaugeVec messagePerTypeCount *prometheus.GaugeVec
messageTotalCount prometheus.Gauge messageTotalCount prometheus.Gauge
messageTotalCountDB prometheus.Gauge
messageSolidCountDB prometheus.Gauge
avgSolidificationTime prometheus.Gauge
messageRequestCount prometheus.Gauge
transactionCounter prometheus.Gauge transactionCounter prometheus.Gauge
valueTips prometheus.Gauge valueTips prometheus.Gauge
...@@ -34,6 +38,21 @@ func registerTangleMetrics() { ...@@ -34,6 +38,21 @@ func registerTangleMetrics() {
Help: "total number of messages seen since the start of the node", Help: "total number of messages seen since the start of the node",
}) })
messageTotalCountDB = prometheus.NewGauge(prometheus.GaugeOpts{
Name: "tangle_message_total_count_db",
Help: "total number of messages in the node's database",
})
messageSolidCountDB = prometheus.NewGauge(prometheus.GaugeOpts{
Name: "tangle_message_solid_count_db",
Help: "number of solid messages on the node's database",
})
avgSolidificationTime = prometheus.NewGauge(prometheus.GaugeOpts{
Name: "tangle_message_avg_solidification_time",
Help: "average time it takes for a message to become solid",
})
transactionCounter = prometheus.NewGauge(prometheus.GaugeOpts{ transactionCounter = prometheus.NewGauge(prometheus.GaugeOpts{
Name: "tangle_value_transaction_counter", Name: "tangle_value_transaction_counter",
Help: "number of value transactions (value payloads) seen", Help: "number of value transactions (value payloads) seen",
...@@ -44,9 +63,18 @@ func registerTangleMetrics() { ...@@ -44,9 +63,18 @@ func registerTangleMetrics() {
Help: "current number of tips in the value tangle", Help: "current number of tips in the value tangle",
}) })
messageRequestCount = prometheus.NewGauge(prometheus.GaugeOpts{
Name: "tangle_message_request_queue_size",
Help: "current number requested messages by the message tangle",
})
registry.MustRegister(messageTips) registry.MustRegister(messageTips)
registry.MustRegister(messagePerTypeCount) registry.MustRegister(messagePerTypeCount)
registry.MustRegister(messageTotalCount) registry.MustRegister(messageTotalCount)
registry.MustRegister(messageTotalCountDB)
registry.MustRegister(messageSolidCountDB)
registry.MustRegister(avgSolidificationTime)
registry.MustRegister(messageRequestCount)
registry.MustRegister(transactionCounter) registry.MustRegister(transactionCounter)
registry.MustRegister(valueTips) registry.MustRegister(valueTips)
...@@ -55,11 +83,15 @@ func registerTangleMetrics() { ...@@ -55,11 +83,15 @@ func registerTangleMetrics() {
func collectTangleMetrics() { func collectTangleMetrics() {
messageTips.Set(float64(metrics.MessageTips())) messageTips.Set(float64(metrics.MessageTips()))
msgCountPerPayload := metrics.MessageCountPerPayload() msgCountPerPayload := metrics.MessageCountSinceStartPerPayload()
for payloadType, count := range msgCountPerPayload { for payloadType, count := range msgCountPerPayload {
messagePerTypeCount.WithLabelValues(payload.Name(payloadType)).Set(float64(count)) messagePerTypeCount.WithLabelValues(payload.Name(payloadType)).Set(float64(count))
} }
messageTotalCount.Set(float64(metrics.MessageTotalCount())) messageTotalCount.Set(float64(metrics.MessageTotalCountSinceStart()))
messageTotalCountDB.Set(float64(metrics.MessageTotalCountDB()))
messageSolidCountDB.Set(float64(metrics.MessageSolidCountDB()))
avgSolidificationTime.Set(metrics.AvgSolidificationTime())
messageRequestCount.Set(float64(metrics.MessageRequestQueueSize()))
transactionCounter.Set(float64(metrics.ValueTransactionCounter())) transactionCounter.Set(float64(metrics.ValueTransactionCounter()))
valueTips.Set(float64(metrics.ValueTips())) valueTips.Set(float64(metrics.ValueTips()))
} }
...@@ -7,6 +7,7 @@ import ( ...@@ -7,6 +7,7 @@ import (
"github.com/iotaledger/goshimmer/plugins/autopeering/local" "github.com/iotaledger/goshimmer/plugins/autopeering/local"
"github.com/iotaledger/goshimmer/plugins/banner" "github.com/iotaledger/goshimmer/plugins/banner"
"github.com/iotaledger/goshimmer/plugins/metrics"
"github.com/iotaledger/goshimmer/plugins/sync" "github.com/iotaledger/goshimmer/plugins/sync"
"github.com/iotaledger/goshimmer/plugins/webapi" "github.com/iotaledger/goshimmer/plugins/webapi"
"github.com/iotaledger/hive.go/node" "github.com/iotaledger/hive.go/node"
...@@ -84,12 +85,15 @@ func getInfo(c echo.Context) error { ...@@ -84,12 +85,15 @@ func getInfo(c echo.Context) error {
sort.Strings(disabledPlugins) sort.Strings(disabledPlugins)
return c.JSON(http.StatusOK, Response{ return c.JSON(http.StatusOK, Response{
Version: banner.AppVersion, Version: banner.AppVersion,
Synced: sync.Synced(), Synced: sync.Synced(),
IdentityID: local.GetInstance().Identity.ID().String(), IdentityID: local.GetInstance().Identity.ID().String(),
PublicKey: local.GetInstance().PublicKey().String(), PublicKey: local.GetInstance().PublicKey().String(),
EnabledPlugins: enabledPlugins, MessageRequestQueueSize: int(metrics.MessageRequestQueueSize()),
DisabledPlugins: disabledPlugins, SolidMessageCount: int(metrics.MessageSolidCountDB()),
TotalMessageCount: int(metrics.MessageTotalCountDB()),
EnabledPlugins: enabledPlugins,
DisabledPlugins: disabledPlugins,
}) })
} }
...@@ -103,6 +107,12 @@ type Response struct { ...@@ -103,6 +107,12 @@ type Response struct {
IdentityID string `json:"identityID,omitempty"` IdentityID string `json:"identityID,omitempty"`
// public key of the node encoded in base58 // public key of the node encoded in base58
PublicKey string `json:"publicKey,omitempty"` PublicKey string `json:"publicKey,omitempty"`
// MessageRequestQueueSize is the number of messages a node is trying to request from neighbors.
MessageRequestQueueSize int `json:"messageRequestQueueSize,omitempty"`
// SolidMessageCount is the number of solid messages in the node's database.
SolidMessageCount int `json:"solidMessageCount,omitempty"`
// TotalMessageCount is the number of messages in the node's database.
TotalMessageCount int `json:"totalMessageCount,omitempty"`
// list of enabled plugins // list of enabled plugins
EnabledPlugins []string `json:"enabledPlugins,omitempty"` EnabledPlugins []string `json:"enabledPlugins,omitempty"`
// list if disabled plugins // list if disabled plugins
......
package tools
import (
"container/list"
"fmt"
"net/http"
"sync"
"github.com/iotaledger/goshimmer/packages/binary/messagelayer/message"
"github.com/iotaledger/goshimmer/plugins/messagelayer"
"github.com/iotaledger/goshimmer/plugins/webapi"
"github.com/iotaledger/hive.go/logger"
"github.com/iotaledger/hive.go/node"
"github.com/labstack/echo"
)
// PluginName is the name of the web API tools endpoint plugin.
const PluginName = "WebAPI tools Endpoint"
var (
// plugin is the plugin instance of the web API tools endpoint plugin.
plugin *node.Plugin
once sync.Once
log *logger.Logger
)
// Plugin gets the plugin instance.
func Plugin() *node.Plugin {
once.Do(func() {
plugin = node.NewPlugin(PluginName, node.Disabled, configure)
})
return plugin
}
func configure(_ *node.Plugin) {
log = logger.NewLogger(PluginName)
webapi.Server().GET("tools/pastcone", pastCone)
}
func pastCone(c echo.Context) error {
var checkedMessageCount int
var request PastConeRequest
if err := c.Bind(&request); err != nil {
log.Info(err.Error())
return c.JSON(http.StatusBadRequest, PastConeResponse{Error: err.Error()})
}
log.Info("Received:", request.ID)
msgID, err := message.NewId(request.ID)
if err != nil {
log.Info(err)
return c.JSON(http.StatusBadRequest, PastConeResponse{Error: err.Error()})
}
// create a new stack that hold messages to check
stack := list.New()
stack.PushBack(msgID)
// keep track of submitted checks (to not re-add something to the stack that is already in it)
// searching in double-linked list is quite expensive, but not in a map
submitted := make(map[message.Id]bool)
// process messages in stack, try to request parents until we end up at the genesis
for stack.Len() > 0 {
checkedMessageCount++
// pop the first element from stack
currentMsgElement := stack.Front()
currentMsgID := currentMsgElement.Value.(message.Id)
stack.Remove(currentMsgElement)
// ask node if it has it
msgObject := messagelayer.Tangle().Message(currentMsgID)
msgMetadataObject := messagelayer.Tangle().MessageMetadata(currentMsgID)
if !msgObject.Exists() || !msgMetadataObject.Exists() {
return c.JSON(http.StatusOK, PastConeResponse{Exist: false, PastConeSize: checkedMessageCount, Error: fmt.Sprintf("couldn't find %s message on node", currentMsgID)})
}
// get trunk and branch
msg := msgObject.Unwrap()
branchID := msg.BranchId()
trunkID := msg.TrunkId()
// release objects
msgObject.Release()
msgMetadataObject.Release()
if branchID == message.EmptyId && msg.TrunkId() == message.EmptyId {
// msg only attaches to genesis
continue
} else {
if !submitted[branchID] && branchID != message.EmptyId {
stack.PushBack(branchID)
submitted[branchID] = true
}
if !submitted[trunkID] && trunkID != message.EmptyId {
stack.PushBack(trunkID)
submitted[trunkID] = true
}
}
}
return c.JSON(http.StatusOK, PastConeResponse{Exist: true, PastConeSize: checkedMessageCount})
}
// PastConeRequest holds the message id to query.
type PastConeRequest struct {
ID string `json:"id"`
}
// PastConeResponse is the HTTP response containing the number of messages in the past cone and if all messages of the past cone
// exist on the node.
type PastConeResponse struct {
Exist bool `json:"exist,omitempty"`
PastConeSize int `json:"pastConeSize,omitempty"`
Error string `json:"error,omitempty"`
}
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
"editable": true, "editable": true,
"gnetId": null, "gnetId": null,
"graphTooltip": 0, "graphTooltip": 0,
"id": 1, "id": 2,
"links": [], "links": [],
"panels": [ "panels": [
{ {
...@@ -74,7 +74,7 @@ ...@@ -74,7 +74,7 @@
"values": false "values": false
} }
}, },
"pluginVersion": "7.0.3", "pluginVersion": "7.0.4",
"targets": [ "targets": [
{ {
"expr": "iota_info_app", "expr": "iota_info_app",
...@@ -153,7 +153,7 @@ ...@@ -153,7 +153,7 @@
"values": false "values": false
} }
}, },
"pluginVersion": "7.0.3", "pluginVersion": "7.0.4",
"targets": [ "targets": [
{ {
"expr": "sync", "expr": "sync",
...@@ -212,7 +212,7 @@ ...@@ -212,7 +212,7 @@
"values": false "values": false
} }
}, },
"pluginVersion": "7.0.3", "pluginVersion": "7.0.4",
"targets": [ "targets": [
{ {
"expr": "irate(tangle_message_total_count[5m])", "expr": "irate(tangle_message_total_count[5m])",
...@@ -270,7 +270,7 @@ ...@@ -270,7 +270,7 @@
"values": false "values": false
} }
}, },
"pluginVersion": "7.0.3", "pluginVersion": "7.0.4",
"targets": [ "targets": [
{ {
"expr": "process_cpu_usage", "expr": "process_cpu_usage",
...@@ -324,7 +324,7 @@ ...@@ -324,7 +324,7 @@
"values": false "values": false
} }
}, },
"pluginVersion": "7.0.3", "pluginVersion": "7.0.4",
"targets": [ "targets": [
{ {
"expr": "process_mem_usage_bytes/1024/1024", "expr": "process_mem_usage_bytes/1024/1024",
...@@ -382,7 +382,7 @@ ...@@ -382,7 +382,7 @@
"values": false "values": false
} }
}, },
"pluginVersion": "7.0.3", "pluginVersion": "7.0.4",
"targets": [ "targets": [
{ {
"expr": "db_size_bytes/1024/1024", "expr": "db_size_bytes/1024/1024",
...@@ -693,7 +693,7 @@ ...@@ -693,7 +693,7 @@
"values": false "values": false
} }
}, },
"pluginVersion": "7.0.3", "pluginVersion": "7.0.4",
"targets": [ "targets": [
{ {
"expr": "autopeering_neighbor_connections_count - autopeering_neighbor_drop_count", "expr": "autopeering_neighbor_connections_count - autopeering_neighbor_drop_count",
...@@ -747,7 +747,7 @@ ...@@ -747,7 +747,7 @@
"values": false "values": false
} }
}, },
"pluginVersion": "7.0.3", "pluginVersion": "7.0.4",
"targets": [ "targets": [
{ {
"expr": "autopeering_avg_neighbor_connection_lifetime", "expr": "autopeering_avg_neighbor_connection_lifetime",
...@@ -804,7 +804,7 @@ ...@@ -804,7 +804,7 @@
"values": false "values": false
} }
}, },
"pluginVersion": "7.0.3", "pluginVersion": "7.0.4",
"targets": [ "targets": [
{ {
"expr": "autopeering_neighbor_connections_count", "expr": "autopeering_neighbor_connections_count",
...@@ -861,7 +861,7 @@ ...@@ -861,7 +861,7 @@
"values": false "values": false
} }
}, },
"pluginVersion": "7.0.3", "pluginVersion": "7.0.4",
"targets": [ "targets": [
{ {
"expr": "autopeering_neighbor_drop_count", "expr": "autopeering_neighbor_drop_count",
...@@ -1170,6 +1170,7 @@ ...@@ -1170,6 +1170,7 @@
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": "Prometheus", "datasource": "Prometheus",
"description": "Average time it takes to solidify messages.",
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
"custom": {} "custom": {}
...@@ -1179,12 +1180,310 @@ ...@@ -1179,12 +1180,310 @@
"fill": 1, "fill": 1,
"fillGradient": 0, "fillGradient": 0,
"gridPos": { "gridPos": {
"h": 10, "h": 8,
"w": 11, "w": 11,
"x": 0, "x": 0,
"y": 25 "y": 25
}, },
"hiddenSeries": false, "hiddenSeries": false,
"id": 75,
"legend": {
"avg": false,
"current": false,
"max": false,
"min": false,
"show": true,
"total": false,
"values": false
},
"lines": true,
"linewidth": 1,
"nullPointMode": "null",
"options": {
"dataLinks": []
},
"percentage": false,
"pointradius": 2,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"expr": "tangle_message_avg_solidification_time",
"interval": "",
"legendFormat": "Avg Solidification Time",
"refId": "A"
}
],
"thresholds": [],
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "Average Solidification Time",
"tooltip": {
"shared": true,
"sort": 0,
"value_type": "individual"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "ms",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
},
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
}
],
"yaxis": {
"align": false,
"alignLevel": null
}
},
{
"aliasColors": {},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "Prometheus",
"description": "Describes the amount of total, solid and not solid messages in the node's database.",
"fieldConfig": {
"defaults": {
"custom": {}
},
"overrides": []
},
"fill": 1,
"fillGradient": 0,
"gridPos": {
"h": 16,
"w": 13,
"x": 11,
"y": 25
},
"hiddenSeries": false,
"id": 73,
"legend": {
"alignAsTable": true,
"avg": false,
"current": true,
"max": false,
"min": false,
"rightSide": true,
"show": true,
"total": false,
"values": true
},
"lines": true,
"linewidth": 1,
"nullPointMode": "null",
"options": {
"dataLinks": []
},
"percentage": false,
"pointradius": 2,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"expr": "tangle_message_solid_count_db",
"interval": "",
"legendFormat": "Solid Messages in DB",
"refId": "A"
},
{
"expr": "tangle_message_total_count_db - tangle_message_solid_count_db",
"interval": "",
"legendFormat": "Not Solid Messages in DB",
"refId": "B"
},
{
"expr": "tangle_message_total_count_db",
"interval": "",
"legendFormat": "Total Messages in DB",
"refId": "C"
}
],
"thresholds": [],
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "Messages in Database",
"tooltip": {
"shared": true,
"sort": 0,
"value_type": "individual"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": "0",
"show": true
},
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
}
],
"yaxis": {
"align": false,
"alignLevel": null
}
},
{
"aliasColors": {},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "Prometheus",
"description": "Number of messages currently requested by the message tangle.",
"fieldConfig": {
"defaults": {
"custom": {}
},
"overrides": []
},
"fill": 1,
"fillGradient": 0,
"gridPos": {
"h": 8,
"w": 11,
"x": 0,
"y": 33
},
"hiddenSeries": false,
"id": 69,
"legend": {
"avg": false,
"current": false,
"max": false,
"min": false,
"show": true,
"total": false,
"values": false
},
"lines": true,
"linewidth": 1,
"nullPointMode": "null",
"options": {
"dataLinks": []
},
"percentage": false,
"pointradius": 2,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"expr": "tangle_message_request_queue_size",
"interval": "",
"legendFormat": "Message Request Queue Size",
"refId": "A"
}
],
"thresholds": [],
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "Message Request Queue Size",
"tooltip": {
"shared": true,
"sort": 0,
"value_type": "individual"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": "0",
"show": true
},
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": "0",
"show": false
}
],
"yaxis": {
"align": false,
"alignLevel": null
}
},
{
"aliasColors": {},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "Prometheus",
"fieldConfig": {
"defaults": {
"custom": {}
},
"overrides": []
},
"fill": 1,
"fillGradient": 0,
"gridPos": {
"h": 10,
"w": 11,
"x": 0,
"y": 41
},
"hiddenSeries": false,
"id": 26, "id": 26,
"legend": { "legend": {
"avg": false, "avg": false,
...@@ -1308,7 +1607,7 @@ ...@@ -1308,7 +1607,7 @@
"h": 3, "h": 3,
"w": 6, "w": 6,
"x": 11, "x": 11,
"y": 25 "y": 41
}, },
"id": 61, "id": 61,
"mode": "markdown", "mode": "markdown",
...@@ -1340,7 +1639,7 @@ ...@@ -1340,7 +1639,7 @@
"h": 2, "h": 2,
"w": 2, "w": 2,
"x": 11, "x": 11,
"y": 28 "y": 44
}, },
"id": 67, "id": 67,
"options": { "options": {
...@@ -1356,7 +1655,7 @@ ...@@ -1356,7 +1655,7 @@
"values": false "values": false
} }
}, },
"pluginVersion": "7.0.3", "pluginVersion": "7.0.4",
"targets": [ "targets": [
{ {
"expr": "traffic_gossip_outbound_bytes", "expr": "traffic_gossip_outbound_bytes",
...@@ -1393,7 +1692,7 @@ ...@@ -1393,7 +1692,7 @@
"h": 2, "h": 2,
"w": 2, "w": 2,
"x": 13, "x": 13,
"y": 28 "y": 44
}, },
"id": 66, "id": 66,
"options": { "options": {
...@@ -1409,7 +1708,7 @@ ...@@ -1409,7 +1708,7 @@
"values": false "values": false
} }
}, },
"pluginVersion": "7.0.3", "pluginVersion": "7.0.4",
"targets": [ "targets": [
{ {
"expr": "traffic_gossip_inbound_bytes", "expr": "traffic_gossip_inbound_bytes",
...@@ -1446,7 +1745,7 @@ ...@@ -1446,7 +1745,7 @@
"h": 2, "h": 2,
"w": 2, "w": 2,
"x": 15, "x": 15,
"y": 28 "y": 44
}, },
"id": 59, "id": 59,
"options": { "options": {
...@@ -1462,7 +1761,7 @@ ...@@ -1462,7 +1761,7 @@
"values": false "values": false
} }
}, },
"pluginVersion": "7.0.3", "pluginVersion": "7.0.4",
"targets": [ "targets": [
{ {
"expr": "traffic_analysis_outbound_bytes", "expr": "traffic_analysis_outbound_bytes",
...@@ -1499,7 +1798,7 @@ ...@@ -1499,7 +1798,7 @@
"h": 2, "h": 2,
"w": 3, "w": 3,
"x": 11, "x": 11,
"y": 30 "y": 46
}, },
"id": 63, "id": 63,
"options": { "options": {
...@@ -1515,7 +1814,7 @@ ...@@ -1515,7 +1814,7 @@
"values": false "values": false
} }
}, },
"pluginVersion": "7.0.3", "pluginVersion": "7.0.4",
"targets": [ "targets": [
{ {
"expr": "traffic_autopeering_outbound_bytes", "expr": "traffic_autopeering_outbound_bytes",
...@@ -1552,7 +1851,7 @@ ...@@ -1552,7 +1851,7 @@
"h": 2, "h": 2,
"w": 3, "w": 3,
"x": 14, "x": 14,
"y": 30 "y": 46
}, },
"id": 62, "id": 62,
"options": { "options": {
...@@ -1568,7 +1867,7 @@ ...@@ -1568,7 +1867,7 @@
"values": false "values": false
} }
}, },
"pluginVersion": "7.0.3", "pluginVersion": "7.0.4",
"targets": [ "targets": [
{ {
"expr": "traffic_autopeering_inbound_bytes", "expr": "traffic_autopeering_inbound_bytes",
...@@ -1605,7 +1904,7 @@ ...@@ -1605,7 +1904,7 @@
"h": 2, "h": 2,
"w": 2, "w": 2,
"x": 11, "x": 11,
"y": 32 "y": 48
}, },
"id": 64, "id": 64,
"options": { "options": {
...@@ -1621,7 +1920,7 @@ ...@@ -1621,7 +1920,7 @@
"values": false "values": false
} }
}, },
"pluginVersion": "7.0.3", "pluginVersion": "7.0.4",
"targets": [ "targets": [
{ {
"expr": "traffic_fpc_inbound_bytes", "expr": "traffic_fpc_inbound_bytes",
...@@ -1658,7 +1957,7 @@ ...@@ -1658,7 +1957,7 @@
"h": 2, "h": 2,
"w": 2, "w": 2,
"x": 13, "x": 13,
"y": 32 "y": 48
}, },
"id": 65, "id": 65,
"options": { "options": {
...@@ -1674,7 +1973,7 @@ ...@@ -1674,7 +1973,7 @@
"values": false "values": false
} }
}, },
"pluginVersion": "7.0.3", "pluginVersion": "7.0.4",
"targets": [ "targets": [
{ {
"expr": "traffic_fpc_outbound_bytes", "expr": "traffic_fpc_outbound_bytes",
...@@ -1695,7 +1994,7 @@ ...@@ -1695,7 +1994,7 @@
"h": 1, "h": 1,
"w": 24, "w": 24,
"x": 0, "x": 0,
"y": 35 "y": 51
}, },
"id": 34, "id": 34,
"panels": [], "panels": [],
...@@ -1720,7 +2019,7 @@ ...@@ -1720,7 +2019,7 @@
"h": 8, "h": 8,
"w": 12, "w": 12,
"x": 0, "x": 0,
"y": 36 "y": 52
}, },
"hiddenSeries": false, "hiddenSeries": false,
"id": 36, "id": 36,
...@@ -1823,7 +2122,7 @@ ...@@ -1823,7 +2122,7 @@
"h": 8, "h": 8,
"w": 4, "w": 4,
"x": 12, "x": 12,
"y": 36 "y": 52
}, },
"id": 38, "id": 38,
"options": { "options": {
...@@ -1839,7 +2138,7 @@ ...@@ -1839,7 +2138,7 @@
"values": false "values": false
} }
}, },
"pluginVersion": "7.0.3", "pluginVersion": "7.0.4",
"targets": [ "targets": [
{ {
"expr": "fpc_avg_rounds_to_finalize", "expr": "fpc_avg_rounds_to_finalize",
...@@ -1880,7 +2179,7 @@ ...@@ -1880,7 +2179,7 @@
"h": 8, "h": 8,
"w": 3, "w": 3,
"x": 16, "x": 16,
"y": 36 "y": 52
}, },
"id": 42, "id": 42,
"options": { "options": {
...@@ -1896,7 +2195,7 @@ ...@@ -1896,7 +2195,7 @@
"values": false "values": false
} }
}, },
"pluginVersion": "7.0.3", "pluginVersion": "7.0.4",
"targets": [ "targets": [
{ {
"expr": "fpc_finalized_conflicts", "expr": "fpc_finalized_conflicts",
...@@ -1937,7 +2236,7 @@ ...@@ -1937,7 +2236,7 @@
"h": 8, "h": 8,
"w": 3, "w": 3,
"x": 19, "x": 19,
"y": 36 "y": 52
}, },
"id": 40, "id": 40,
"options": { "options": {
...@@ -1953,7 +2252,7 @@ ...@@ -1953,7 +2252,7 @@
"values": false "values": false
} }
}, },
"pluginVersion": "7.0.3", "pluginVersion": "7.0.4",
"targets": [ "targets": [
{ {
"expr": "fpc_failed_conflicts", "expr": "fpc_failed_conflicts",
...@@ -1986,7 +2285,7 @@ ...@@ -1986,7 +2285,7 @@
"h": 8, "h": 8,
"w": 12, "w": 12,
"x": 0, "x": 0,
"y": 44 "y": 60
}, },
"hiddenSeries": false, "hiddenSeries": false,
"id": 44, "id": 44,
...@@ -2080,7 +2379,7 @@ ...@@ -2080,7 +2379,7 @@
"h": 8, "h": 8,
"w": 12, "w": 12,
"x": 12, "x": 12,
"y": 44 "y": 60
}, },
"hiddenSeries": false, "hiddenSeries": false,
"id": 50, "id": 50,
...@@ -2175,7 +2474,7 @@ ...@@ -2175,7 +2474,7 @@
"h": 8, "h": 8,
"w": 12, "w": 12,
"x": 0, "x": 0,
"y": 52 "y": 68
}, },
"hiddenSeries": false, "hiddenSeries": false,
"id": 49, "id": 49,
...@@ -2269,7 +2568,7 @@ ...@@ -2269,7 +2568,7 @@
"h": 8, "h": 8,
"w": 12, "w": 12,
"x": 12, "x": 12,
"y": 52 "y": 68
}, },
"hiddenSeries": false, "hiddenSeries": false,
"id": 46, "id": 46,
...@@ -2376,5 +2675,5 @@ ...@@ -2376,5 +2675,5 @@
"timezone": "", "timezone": "",
"title": "GoShimmer Local Metrics", "title": "GoShimmer Local Metrics",
"uid": "kjOQZ2ZMk", "uid": "kjOQZ2ZMk",
"version": 5 "version": 11
} }
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
"editable": true, "editable": true,
"gnetId": null, "gnetId": null,
"graphTooltip": 0, "graphTooltip": 0,
"id": 1, "id": 2,
"links": [], "links": [],
"panels": [ "panels": [
{ {
...@@ -74,7 +74,7 @@ ...@@ -74,7 +74,7 @@
"values": false "values": false
} }
}, },
"pluginVersion": "7.0.3", "pluginVersion": "7.0.4",
"targets": [ "targets": [
{ {
"expr": "iota_info_app", "expr": "iota_info_app",
...@@ -153,7 +153,7 @@ ...@@ -153,7 +153,7 @@
"values": false "values": false
} }
}, },
"pluginVersion": "7.0.3", "pluginVersion": "7.0.4",
"targets": [ "targets": [
{ {
"expr": "sync", "expr": "sync",
...@@ -212,7 +212,7 @@ ...@@ -212,7 +212,7 @@
"values": false "values": false
} }
}, },
"pluginVersion": "7.0.3", "pluginVersion": "7.0.4",
"targets": [ "targets": [
{ {
"expr": "irate(tangle_message_total_count[5m])", "expr": "irate(tangle_message_total_count[5m])",
...@@ -270,7 +270,7 @@ ...@@ -270,7 +270,7 @@
"values": false "values": false
} }
}, },
"pluginVersion": "7.0.3", "pluginVersion": "7.0.4",
"targets": [ "targets": [
{ {
"expr": "process_cpu_usage", "expr": "process_cpu_usage",
...@@ -324,7 +324,7 @@ ...@@ -324,7 +324,7 @@
"values": false "values": false
} }
}, },
"pluginVersion": "7.0.3", "pluginVersion": "7.0.4",
"targets": [ "targets": [
{ {
"expr": "process_mem_usage_bytes/1024/1024", "expr": "process_mem_usage_bytes/1024/1024",
...@@ -382,7 +382,7 @@ ...@@ -382,7 +382,7 @@
"values": false "values": false
} }
}, },
"pluginVersion": "7.0.3", "pluginVersion": "7.0.4",
"targets": [ "targets": [
{ {
"expr": "db_size_bytes/1024/1024", "expr": "db_size_bytes/1024/1024",
...@@ -693,7 +693,7 @@ ...@@ -693,7 +693,7 @@
"values": false "values": false
} }
}, },
"pluginVersion": "7.0.3", "pluginVersion": "7.0.4",
"targets": [ "targets": [
{ {
"expr": "autopeering_neighbor_connections_count - autopeering_neighbor_drop_count", "expr": "autopeering_neighbor_connections_count - autopeering_neighbor_drop_count",
...@@ -747,7 +747,7 @@ ...@@ -747,7 +747,7 @@
"values": false "values": false
} }
}, },
"pluginVersion": "7.0.3", "pluginVersion": "7.0.4",
"targets": [ "targets": [
{ {
"expr": "autopeering_avg_neighbor_connection_lifetime", "expr": "autopeering_avg_neighbor_connection_lifetime",
...@@ -804,7 +804,7 @@ ...@@ -804,7 +804,7 @@
"values": false "values": false
} }
}, },
"pluginVersion": "7.0.3", "pluginVersion": "7.0.4",
"targets": [ "targets": [
{ {
"expr": "autopeering_neighbor_connections_count", "expr": "autopeering_neighbor_connections_count",
...@@ -861,7 +861,7 @@ ...@@ -861,7 +861,7 @@
"values": false "values": false
} }
}, },
"pluginVersion": "7.0.3", "pluginVersion": "7.0.4",
"targets": [ "targets": [
{ {
"expr": "autopeering_neighbor_drop_count", "expr": "autopeering_neighbor_drop_count",
...@@ -1170,6 +1170,7 @@ ...@@ -1170,6 +1170,7 @@
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": "Prometheus", "datasource": "Prometheus",
"description": "Average time it takes to solidify messages.",
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
"custom": {} "custom": {}
...@@ -1179,12 +1180,310 @@ ...@@ -1179,12 +1180,310 @@
"fill": 1, "fill": 1,
"fillGradient": 0, "fillGradient": 0,
"gridPos": { "gridPos": {
"h": 10, "h": 8,
"w": 11, "w": 11,
"x": 0, "x": 0,
"y": 25 "y": 25
}, },
"hiddenSeries": false, "hiddenSeries": false,
"id": 75,
"legend": {
"avg": false,
"current": false,
"max": false,
"min": false,
"show": true,
"total": false,
"values": false
},
"lines": true,
"linewidth": 1,
"nullPointMode": "null",
"options": {
"dataLinks": []
},
"percentage": false,
"pointradius": 2,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"expr": "tangle_message_avg_solidification_time",
"interval": "",
"legendFormat": "Avg Solidification Time",
"refId": "A"
}
],
"thresholds": [],
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "Average Solidification Time",
"tooltip": {
"shared": true,
"sort": 0,
"value_type": "individual"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "ms",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
},
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
}
],
"yaxis": {
"align": false,
"alignLevel": null
}
},
{
"aliasColors": {},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "Prometheus",
"description": "Describes the amount of total, solid and not solid messages in the node's database.",
"fieldConfig": {
"defaults": {
"custom": {}
},
"overrides": []
},
"fill": 1,
"fillGradient": 0,
"gridPos": {
"h": 16,
"w": 13,
"x": 11,
"y": 25
},
"hiddenSeries": false,
"id": 73,
"legend": {
"alignAsTable": true,
"avg": false,
"current": true,
"max": false,
"min": false,
"rightSide": true,
"show": true,
"total": false,
"values": true
},
"lines": true,
"linewidth": 1,
"nullPointMode": "null",
"options": {
"dataLinks": []
},
"percentage": false,
"pointradius": 2,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"expr": "tangle_message_solid_count_db",
"interval": "",
"legendFormat": "Solid Messages in DB",
"refId": "A"
},
{
"expr": "tangle_message_total_count_db - tangle_message_solid_count_db",
"interval": "",
"legendFormat": "Not Solid Messages in DB",
"refId": "B"
},
{
"expr": "tangle_message_total_count_db",
"interval": "",
"legendFormat": "Total Messages in DB",
"refId": "C"
}
],
"thresholds": [],
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "Messages in Database",
"tooltip": {
"shared": true,
"sort": 0,
"value_type": "individual"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": "0",
"show": true
},
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
}
],
"yaxis": {
"align": false,
"alignLevel": null
}
},
{
"aliasColors": {},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "Prometheus",
"description": "Number of messages currently requested by the message tangle.",
"fieldConfig": {
"defaults": {
"custom": {}
},
"overrides": []
},
"fill": 1,
"fillGradient": 0,
"gridPos": {
"h": 8,
"w": 11,
"x": 0,
"y": 33
},
"hiddenSeries": false,
"id": 69,
"legend": {
"avg": false,
"current": false,
"max": false,
"min": false,
"show": true,
"total": false,
"values": false
},
"lines": true,
"linewidth": 1,
"nullPointMode": "null",
"options": {
"dataLinks": []
},
"percentage": false,
"pointradius": 2,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"expr": "tangle_message_request_queue_size",
"interval": "",
"legendFormat": "Message Request Queue Size",
"refId": "A"
}
],
"thresholds": [],
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "Message Request Queue Size",
"tooltip": {
"shared": true,
"sort": 0,
"value_type": "individual"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": "0",
"show": true
},
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": "0",
"show": false
}
],
"yaxis": {
"align": false,
"alignLevel": null
}
},
{
"aliasColors": {},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "Prometheus",
"fieldConfig": {
"defaults": {
"custom": {}
},
"overrides": []
},
"fill": 1,
"fillGradient": 0,
"gridPos": {
"h": 10,
"w": 11,
"x": 0,
"y": 41
},
"hiddenSeries": false,
"id": 26, "id": 26,
"legend": { "legend": {
"avg": false, "avg": false,
...@@ -1308,7 +1607,7 @@ ...@@ -1308,7 +1607,7 @@
"h": 3, "h": 3,
"w": 6, "w": 6,
"x": 11, "x": 11,
"y": 25 "y": 41
}, },
"id": 61, "id": 61,
"mode": "markdown", "mode": "markdown",
...@@ -1340,7 +1639,7 @@ ...@@ -1340,7 +1639,7 @@
"h": 2, "h": 2,
"w": 2, "w": 2,
"x": 11, "x": 11,
"y": 28 "y": 44
}, },
"id": 67, "id": 67,
"options": { "options": {
...@@ -1356,7 +1655,7 @@ ...@@ -1356,7 +1655,7 @@
"values": false "values": false
} }
}, },
"pluginVersion": "7.0.3", "pluginVersion": "7.0.4",
"targets": [ "targets": [
{ {
"expr": "traffic_gossip_outbound_bytes", "expr": "traffic_gossip_outbound_bytes",
...@@ -1393,7 +1692,7 @@ ...@@ -1393,7 +1692,7 @@
"h": 2, "h": 2,
"w": 2, "w": 2,
"x": 13, "x": 13,
"y": 28 "y": 44
}, },
"id": 66, "id": 66,
"options": { "options": {
...@@ -1409,7 +1708,7 @@ ...@@ -1409,7 +1708,7 @@
"values": false "values": false
} }
}, },
"pluginVersion": "7.0.3", "pluginVersion": "7.0.4",
"targets": [ "targets": [
{ {
"expr": "traffic_gossip_inbound_bytes", "expr": "traffic_gossip_inbound_bytes",
...@@ -1446,7 +1745,7 @@ ...@@ -1446,7 +1745,7 @@
"h": 2, "h": 2,
"w": 2, "w": 2,
"x": 15, "x": 15,
"y": 28 "y": 44
}, },
"id": 59, "id": 59,
"options": { "options": {
...@@ -1462,7 +1761,7 @@ ...@@ -1462,7 +1761,7 @@
"values": false "values": false
} }
}, },
"pluginVersion": "7.0.3", "pluginVersion": "7.0.4",
"targets": [ "targets": [
{ {
"expr": "traffic_analysis_outbound_bytes", "expr": "traffic_analysis_outbound_bytes",
...@@ -1499,7 +1798,7 @@ ...@@ -1499,7 +1798,7 @@
"h": 2, "h": 2,
"w": 3, "w": 3,
"x": 11, "x": 11,
"y": 30 "y": 46
}, },
"id": 63, "id": 63,
"options": { "options": {
...@@ -1515,7 +1814,7 @@ ...@@ -1515,7 +1814,7 @@
"values": false "values": false
} }
}, },
"pluginVersion": "7.0.3", "pluginVersion": "7.0.4",
"targets": [ "targets": [
{ {
"expr": "traffic_autopeering_outbound_bytes", "expr": "traffic_autopeering_outbound_bytes",
...@@ -1552,7 +1851,7 @@ ...@@ -1552,7 +1851,7 @@
"h": 2, "h": 2,
"w": 3, "w": 3,
"x": 14, "x": 14,
"y": 30 "y": 46
}, },
"id": 62, "id": 62,
"options": { "options": {
...@@ -1568,7 +1867,7 @@ ...@@ -1568,7 +1867,7 @@
"values": false "values": false
} }
}, },
"pluginVersion": "7.0.3", "pluginVersion": "7.0.4",
"targets": [ "targets": [
{ {
"expr": "traffic_autopeering_inbound_bytes", "expr": "traffic_autopeering_inbound_bytes",
...@@ -1605,7 +1904,7 @@ ...@@ -1605,7 +1904,7 @@
"h": 2, "h": 2,
"w": 2, "w": 2,
"x": 11, "x": 11,
"y": 32 "y": 48
}, },
"id": 64, "id": 64,
"options": { "options": {
...@@ -1621,7 +1920,7 @@ ...@@ -1621,7 +1920,7 @@
"values": false "values": false
} }
}, },
"pluginVersion": "7.0.3", "pluginVersion": "7.0.4",
"targets": [ "targets": [
{ {
"expr": "traffic_fpc_inbound_bytes", "expr": "traffic_fpc_inbound_bytes",
...@@ -1658,7 +1957,7 @@ ...@@ -1658,7 +1957,7 @@
"h": 2, "h": 2,
"w": 2, "w": 2,
"x": 13, "x": 13,
"y": 32 "y": 48
}, },
"id": 65, "id": 65,
"options": { "options": {
...@@ -1674,7 +1973,7 @@ ...@@ -1674,7 +1973,7 @@
"values": false "values": false
} }
}, },
"pluginVersion": "7.0.3", "pluginVersion": "7.0.4",
"targets": [ "targets": [
{ {
"expr": "traffic_fpc_outbound_bytes", "expr": "traffic_fpc_outbound_bytes",
...@@ -1695,7 +1994,7 @@ ...@@ -1695,7 +1994,7 @@
"h": 1, "h": 1,
"w": 24, "w": 24,
"x": 0, "x": 0,
"y": 35 "y": 51
}, },
"id": 34, "id": 34,
"panels": [], "panels": [],
...@@ -1720,7 +2019,7 @@ ...@@ -1720,7 +2019,7 @@
"h": 8, "h": 8,
"w": 12, "w": 12,
"x": 0, "x": 0,
"y": 36 "y": 52
}, },
"hiddenSeries": false, "hiddenSeries": false,
"id": 36, "id": 36,
...@@ -1823,7 +2122,7 @@ ...@@ -1823,7 +2122,7 @@
"h": 8, "h": 8,
"w": 4, "w": 4,
"x": 12, "x": 12,
"y": 36 "y": 52
}, },
"id": 38, "id": 38,
"options": { "options": {
...@@ -1839,7 +2138,7 @@ ...@@ -1839,7 +2138,7 @@
"values": false "values": false
} }
}, },
"pluginVersion": "7.0.3", "pluginVersion": "7.0.4",
"targets": [ "targets": [
{ {
"expr": "fpc_avg_rounds_to_finalize", "expr": "fpc_avg_rounds_to_finalize",
...@@ -1880,7 +2179,7 @@ ...@@ -1880,7 +2179,7 @@
"h": 8, "h": 8,
"w": 3, "w": 3,
"x": 16, "x": 16,
"y": 36 "y": 52
}, },
"id": 42, "id": 42,
"options": { "options": {
...@@ -1896,7 +2195,7 @@ ...@@ -1896,7 +2195,7 @@
"values": false "values": false
} }
}, },
"pluginVersion": "7.0.3", "pluginVersion": "7.0.4",
"targets": [ "targets": [
{ {
"expr": "fpc_finalized_conflicts", "expr": "fpc_finalized_conflicts",
...@@ -1937,7 +2236,7 @@ ...@@ -1937,7 +2236,7 @@
"h": 8, "h": 8,
"w": 3, "w": 3,
"x": 19, "x": 19,
"y": 36 "y": 52
}, },
"id": 40, "id": 40,
"options": { "options": {
...@@ -1953,7 +2252,7 @@ ...@@ -1953,7 +2252,7 @@
"values": false "values": false
} }
}, },
"pluginVersion": "7.0.3", "pluginVersion": "7.0.4",
"targets": [ "targets": [
{ {
"expr": "fpc_failed_conflicts", "expr": "fpc_failed_conflicts",
...@@ -1986,7 +2285,7 @@ ...@@ -1986,7 +2285,7 @@
"h": 8, "h": 8,
"w": 12, "w": 12,
"x": 0, "x": 0,
"y": 44 "y": 60
}, },
"hiddenSeries": false, "hiddenSeries": false,
"id": 44, "id": 44,
...@@ -2080,7 +2379,7 @@ ...@@ -2080,7 +2379,7 @@
"h": 8, "h": 8,
"w": 12, "w": 12,
"x": 12, "x": 12,
"y": 44 "y": 60
}, },
"hiddenSeries": false, "hiddenSeries": false,
"id": 50, "id": 50,
...@@ -2175,7 +2474,7 @@ ...@@ -2175,7 +2474,7 @@
"h": 8, "h": 8,
"w": 12, "w": 12,
"x": 0, "x": 0,
"y": 52 "y": 68
}, },
"hiddenSeries": false, "hiddenSeries": false,
"id": 49, "id": 49,
...@@ -2269,7 +2568,7 @@ ...@@ -2269,7 +2568,7 @@
"h": 8, "h": 8,
"w": 12, "w": 12,
"x": 12, "x": 12,
"y": 52 "y": 68
}, },
"hiddenSeries": false, "hiddenSeries": false,
"id": 46, "id": 46,
...@@ -2376,5 +2675,5 @@ ...@@ -2376,5 +2675,5 @@
"timezone": "", "timezone": "",
"title": "GoShimmer Local Metrics", "title": "GoShimmer Local Metrics",
"uid": "kjOQZ2ZMk", "uid": "kjOQZ2ZMk",
"version": 5 "version": 11
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment