How to use the CLI?

The CLI is a binary that is installed in the Pandora FMS’ server and to which calls are made from the command line of the server, also with some specific parameters depending on the operations that we need to carry out

This command line management tool can be very useful for us to perform automation tasks through scripting.

With it, we can perform operations as diverse as the creation and deletion of users, modules or agents, the configuration of alerts and policies or the management of events.

The CLI is used making calls by command line on the file /util/pandora_manage.pl, or on the binary /usr/bin/pandora_manage in the Pandora FMS Enterprise version.

In the Open version, a call to CLI follows this format:

perl pandora_manage.pl <option> <parameters of that option>

While in the Enterprise version, the mentioned binary should be used:

pandora_manage <option> <parameters of that option>

Let’s take an example.

We want to create a new group called “Virtuals” that is a child of an existing group called “Servers”.

Taking as an example the Open version, this would be done like this:

perl pandora_manage.pl /etc/pandora/pandora_server.conf --create_group 'Virtuals' 'Servers

For a complete list of operations and parameters that can be used with CLI, please refer to the next entry in the documentation:

https://pandorafms.com/manual/en/documentation/08_technical_reference/03_anexo_cli

Was this article helpful?

Related Articles

Need Support?

Can't find the answer you're looking for?
Contact Support

Recent Discussions