# Pushover

# Introduction

**Ver**. 31-10-2022

<span class="HwtZe" lang="en"><span class="jCAhz ChMk0b"><span class="ryNqvb">With this plugin you can interact with all the pushover messaging API options to send messages to devices.</span></span> <span class="jCAhz ChMk0b"><span class="ryNqvb">These options are: toker, user, message, attachment, device, html, priority, sound, timestamp, title, url, and url\_title.</span></span></span>

<div id="bkmrk-tipo%3A-server-plug-in"><div>**Tipo**: <span class="HwtZe" lang="en"><span class="jCAhz ChMk0b"><span class="ryNqvb">Server plug-in / can also be configured as an agent plug-in.</span></span></span></div></div>

# Compatibility matrix

<table border="1" id="bkmrk-sistemas-donde-se-ha"><tbody><tr><td><div>**<span class="HwtZe" lang="en"><span class="jCAhz ChMk0b"><span class="ryNqvb">Systems where it has been tested</span></span></span>**</div></td><td>CentOS 7 / RHEL 8 / RockyLinux 8

</td></tr><tr><td><div>**<span class="HwtZe" lang="en"><span class="jCAhz ChMk0b"><span class="ryNqvb">Systems where it should work</span></span></span>**</div></td><td>Cualquier sistema linux

</td></tr></tbody></table>

# Pre requisites

- <div><span class="HwtZe" lang="en"><span class="jCAhz ChMk0b"><span class="ryNqvb">Have the Pandora FMS Data Server enabled</span></span></span></div>
- <div><span class="HwtZe" lang="en"><span class="jCAhz ChMk0b"><span class="ryNqvb">Have the Pandora FMS Plugin Server enabled</span></span></span></div>

# Configuration

Create plugin alert

To configure a plugin alert you must enter the command to execute the plugin and its parameters, for this you must create an alert command.

In this menu you can use the macro \_field&lt;X&gt;\_ that will contain the value of the attributes.

[![image-1667567668009.png](https://pandorafms.com/guides/public/uploads/images/gallery/2022-11/scaled-1680-/image-1667567668009.png)](https://pandorafms.com/guides/public/uploads/images/gallery/2022-11/image-1667567668009.png)

The parameters can be filled in below in the fields, each one referring to the macros used, and certain values can be hidden using the HIde option.

[![image-1667567677309.png](https://pandorafms.com/guides/public/uploads/images/gallery/2022-11/scaled-1680-/image-1667567677309.png)](https://pandorafms.com/guides/public/uploads/images/gallery/2022-11/image-1667567677309.png)

The next step is to create an alert action that will call the previously created command.

[![image-1667567702762.png](https://pandorafms.com/guides/public/uploads/images/gallery/2022-11/scaled-1680-/image-1667567702762.png)](https://pandorafms.com/guides/public/uploads/images/gallery/2022-11/image-1667567702762.png)

[![image-1667567714796.png](https://pandorafms.com/guides/public/uploads/images/gallery/2022-11/scaled-1680-/image-1667567714796.png)](https://pandorafms.com/guides/public/uploads/images/gallery/2022-11/image-1667567714796.png)

**Example of message created by the alert in the application view**

[![image-1667568014294.png](https://pandorafms.com/guides/public/uploads/images/gallery/2022-11/scaled-1680-/image-1667568014294.png)](https://pandorafms.com/guides/public/uploads/images/gallery/2022-11/image-1667568014294.png)

[![image-1667568045159.png](https://pandorafms.com/guides/public/uploads/images/gallery/2022-11/scaled-1680-/image-1667568045159.png)](https://pandorafms.com/guides/public/uploads/images/gallery/2022-11/image-1667568045159.png)

# Parameters

<table border="1" id="bkmrk-par%C3%A1metro-descripci%C3%B3" style="border-collapse: collapse; width: 100%; height: 358px;"><tbody><tr style="height: 29px;"><td style="width: 50%; height: 29px;">Parameter</td><td style="width: 50%; height: 29px;">Description</td></tr><tr style="height: 29px;"><td style="width: 50%; height: 29px;"><div><div>--token</div></div></td><td style="width: 50%; height: 29px;">your application's API token (required)</td></tr><tr style="height: 29px;"><td style="width: 50%; height: 29px;">--user</td><td style="width: 50%; height: 29px;">your user/group key (or that of your target user), visible when logging into our control panel; often referred to as USER\_KEY in our documentation and code samples (required)</td></tr><tr style="height: 29px;"><td style="width: 50%; height: 10px;">--message</td><td style="width: 50%; height: 10px;">your message (required)</td></tr><tr style="height: 29px;"><td style="width: 50%; height: 29px;">--html</td><td style="width: 50%; height: 29px;">set 1 to activate HTML parsing</td></tr><tr style="height: 29px;"><td style="width: 50%; height: 29px;">--priority</td><td style="width: 50%; height: 29px;">a value of -2, -1, 0 (default), 1, or 2</td></tr><tr style="height: 29px;"><td style="width: 50%; height: 29px;">--timestamp</td><td style="width: 50%; height: 29px;">a Unix timestamp of one hour to display instead of when our API received it</td></tr><tr style="height: 29px;"><td style="width: 50%; height: 29px;">--title</td><td style="width: 50%; height: 29px;">the title of your message, otherwise the name of your application will be used</td></tr><tr style="height: 29px;"><td style="width: 50%; height: 29px;">--url</td><td style="width: 50%; height: 29px;">a supplementary URL to display with your message</td></tr><tr style="height: 29px;"><td style="width: 50%; height: 29px;">--url\_title</td><td style="width: 50%; height: 29px;">a title for the URL specified as the url parameter, otherwise only the URL is displayed</td></tr><tr style="height: 29px;"><td style="width: 50%; height: 29px;">--device</td><td style="width: 50%; height: 29px;">the name of one of your devices to send only to that device instead of all devices</td></tr><tr style="height: 29px;"><td style="width: 50%; height: 29px;">--attachment</td><td style="width: 50%; height: 29px;">an attached image to send with the message. You must put the path to the image, followed by the image name and the image format, separated by '|' , for example : '/home/alejandro/Documentos/pushover/icono.jpg|icono.jpg|jpeg'.</td></tr><tr style="height: 29px;"><td style="width: 50%; height: 29px;">--sound</td><td style="width: 50%; height: 29px;">the name of a supported sound to override its default sound choice</td></tr></tbody></table>

# Manual execution

```
./pandora_pushover --token <token> --user <user key> --message <message> [ --html < 1 for activate> ] [ --priority <number priority> ] [ --timestamp <timestamp> ] [ --title <title> ] [ --url <url> ] [ --url_title <url title> ] [ --device <device > ] [ --attachment <image> ] [ --sound <sound name> ]
```

[![image-1667224475469.png](https://pandorafms.com/guides/public/uploads/images/gallery/2022-10/scaled-1680-/image-1667224475469.png)](https://pandorafms.com/guides/public/uploads/images/gallery/2022-10/image-1667224475469.png)

View of messages in the app.

[![image-1667224500988.png](https://pandorafms.com/guides/public/uploads/images/gallery/2022-10/scaled-1680-/image-1667224500988.png)](https://pandorafms.com/guides/public/uploads/images/gallery/2022-10/image-1667224500988.png)