Build your own class based plugins to extract the information you want. Have a look at the included example plug-in to see how to build your own.
Plug-in modals and packages are collected from the plug-ins folder and sorted based on the order specified by you by setting the index property in the given plug-in. Once the plug-ins are loaded the commmand line arguments are collected from the parse_args()
function from each of the plug-ins. They are then passed into the load_parse_args()
function where the plug-in collects its class variables.
The data collected from the network is passed in sequence to each of the plugins, giving each the opportunity to parse and manipulate the data before passing the result back for subsequent plugins.
note: plug-ins are only enabled when a flag is given. i.e. the Alerts Plug-in will only run if the --alerts
flag is given. if you have a plug-in that requires more then one argument the first flag will enable the plug-in and the following flags would contain your additional arguments. See the Network Metrics Plug-in as an example.
Once the plug-ins are initialized, the monitor engine will collect the validator-info
data from the nodes in the specified network. The engine will then pass the response to the Analysis Plug-in before passing the analyzed result to all of the subsequent plug-ins for processing.
Have a look at the included plug-ins to get an idea of how to build your own!
The Analysis Plug-in does an analysis of the response returned from the network; returns result.
WARNING this plug-in has to run first in order for the other plug-ins to work. Plug-in index should be set to ZERO set inside the plug-in class under the INIT method. i.e. self.index = 0
This plug-in is required in order to run this monitor and will automatically run without a command line argument
The Status Only Plug-in removes response from the result returning only the status.
./run.sh --net ssn --status
or ./run.sh --net ssn --status --alerts
--status: enables the plug-in
[
{
"name": "Test",
"client-address": "tcp://00.00.00.00:0000",
"node-address": "tcp://00.00.00.00:0000",
"status": {
"ok": true,
"timestamp": "1615837991"
}
},
{
"name": "ect",
"client-address": "tcp://00.00.00.00:0000",
"node-address": "tcp://00.00.00.00:0000",
"status": {
"ok": true,
"timestamp": "1615837991"
}
}
]
See readme
See readme
See readme
See readme