1. Home
  2. Knowledge Base
  3. Articles (EN/ES/FR)
  4. How to create and validate events remotely through Pandora FMS API

How to create and validate events remotely through Pandora FMS API

You can interact with Pandora FMS Server from any remote system using the web API, even if you can’t connect to the Database or you don’t have an installed agent. This can be done trough pandora_revent tool, at:

/usr/share/pandora_server/util/pandora_revent.pl

This tool uses a remote HTTP or HTTPS (recommended) connection to create or validate events on Pandora FMS. When run as above, with no options provided, it will prompt a help text showing its structure:

./pandora_revent.pl -p -u -create_event

Here is an example of use of this tool (note \ as concatenator):

/pandora_revent.pl \
  -p http://192.168.50.12/pandora_console/include/api.php \
  -u pandora12,admin,pandora \
  -create_event -name "Another nice event" \
  -group 0 \
  -type "system" \
  -status 0 \
  -severity 4 \
  -user "davidv" \
  -owner_user "admin" \
  -source "Commandline" \
  -comment "test comment"

This call will create an event named “Another nice event” with pandora12, admin and pandora credentials (corresponding to API password, user and Pandora password, respectively).

This event will be created for every group with Critical relevance and its time will be “System”. It adds as well a comment “test comment” by user “davidy”. The event source will be “CommandLine” and the propietary, “admin”.

pandora_revent tool allows us to validate events, using the following syntax:

./pandora_revent.pl -p -u -validate_event -id

As pandora_revent is based on API, you need to set it up first in order to get it working. This is done on General Setup on Pandora Console.

Was this article helpful?

Related Articles

Need Support?

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

Recent Discussions