Openweathermap
Plugin to collect weather data and display them in PandoraFMS.
- Introduction
- Compatibility matrix
- Pre requisites
- Parameters
- Manual execution
- Configuration in PandoraFMS
- Modules generated by the plugin
Introduction
Ver. 22-08-2022
Plugin to collect weather data and display them in PandoraFMS.
Type: Server plug-in
Compatibility matrix
Systems where tested |
Fedora |
Systems where it should work |
Cualquier sistema linux |
Pre requisites
- Pandora FMS Data Server enabled
- Pandora FMS Plugin Server enabled
Parameters
Parámeter | Description |
--lat | Geographic coordinate (latitude). |
--lon | Geographic coordinate (longitude). |
--key | Your unique API key (you can always find it on your account page in the "api key" tab). |
-g,--group | Pandora FMS target group (optional) |
--data_dir | Pandora FMS data directory. By default it is /var/spool/pandora/data_in/ (optional) |
--as_agent_plugin | It is optional, if you want the plugin to be an agent plugin and put the modules in the pandora agent, execute this with a 1 (optional) |
Manual execution
With an execution with "as_agent_plugin" in 1 we will be able to see the xml by terminal.
❯ ./pandora_openweathermap --lat <latitud> --lon <longitud> --key <api key> --as_agent_plugin 1
Configuration in PandoraFMS
Manual installation
Go to servers > plugins:
Click on add:
We put in name and the description that you prefer.
We put as command the execution with the path of the plugin:
/path_pandora_openweathermap.py
Recuerda que la ruta recomendada para el uso de los plugins de servidor es: /usr/share/pandora_server/util/plugin/
And in plugin parameters we will introduce these followed by the macro "_field<N>_", the obligatory ones for the plugin to work are --lat, --lon and --key .
Once this is done, click on "create".
Once this is done, the only thing left to do is to call it so we will go to the view of some agent and create a plugin module:
We will give it a name and in the section "plugin" we will put the one we have just configured.
Once this is done, click on create.
If the module is shown with 1, it means that it is running correctly.
Modules generated by the plugin
The plugin will create an agent with the following modules:
Current dt |
Current sunrise |
Current sunset |
Current temp |
Current feels like |
Current pressure |
Current humidity |
Current dew point |
Current wind speed |
Current uvi |
Current clouds |
Current visibiity |
Current wind deg |
Current weather id |
Current weather Main |
Current weather description |
Current weather icon |
More info about these metrics in the openweathermap