Our developers have added a new tool to our BitNinjaCLI arsenal. The bitninjacli --stats
command can show basic statistics about the BitNinja agent.
Its intended use is for integration with monitoring solutions.
Usage
Issue the command in your terminal as bitinjacli --stats
this will show a couple of key statistics.
With the --minify
optional switch, the output will be unformatted and can be parsed by programs.
Privileges
The user for the command can be changed to the username of the monitoring service by editing the /etc/bitninja/System/config.ini file.
The enableIntegration
parameter needs to be set to 1, and the allowedUser
variable needs to be equal to the name of the system user of the monitoring solution in question.
It is also important to remove the semicolons from the above-mentioned lines.
To synchronize the locally modified settings with the dashboard and save them, use the following command.
Please always use the below command in case you modify the configuration from the CLI
bitninjacli --syncconfigs
If that is done, restart BitNinja with the service bitninja restart
command.
So the change can take effect.
After this, the command can be called with sudo /usr/sbin/bitninjacli --stats --minify
.
The command’s output might differ from the Dashboard’s data as the output shows the stats since the latest version of BitNinja was installed.