# Plugin Digital Ocean
# Introduction
Ver. 240521
With this plug-in we can see the data of your digital ocean account and your droplets.
It connects to the account via a token.
Type: Server plug-in
# Compatibility matrix
**Systems where it has been tested** | CentOS 7
|
**Systems where it should work** | Any linux system
|
# Prerequisites
Required :
- Digital Ocean account
- Generate an API read token from digital ocean
- Have the Pandora FMS Data Server enabled.
- Pandora FMS Plugin Server enabled.
# Configuration
We will have to generate a token, which will be the key that will access through the api to the data of our account, this is generated in the following way.
Go to api from the digital ocean menu:
[](https://pandorafms.com/guides/public/uploads/images/gallery/2021-05/image-1621929277635.png)
Click on generate new token :
[](https://pandorafms.com/guides/public/uploads/images/gallery/2021-05/image-1621929327184.png)
We give it a name and the permissions we are interested in and we generate it:
[](https://pandorafms.com/guides/public/uploads/images/gallery/2021-05/image-1621929395447.png)
Recuerda guardar bien el token porque solo saldrá una vez, si se extravía siempre se puede crear otro nuevo.
# General plugin parameters
```
./pandora_digitalocean -t [ -g ] [ --data_dir ]
```
If the execution was successful we will see a '1' when the plugin is executed.
[](https://pandorafms.com/guides/public/uploads/images/gallery/2021-05/image-1622016164092.png)
# Plugin-specific parameters
The plug-in has the following parameters:
**Parámetro**
| Descripción
|
-h, --help
| Displays a short help message
|
-t TOKEN, --token TOKEN
| It is mandatory. To enter the token we have generated in digital ocean
|
-g GROUP, --group GROUP
| Pandora FMS Target Group
|
--data\_dir DATA\_DIR
| Pandora FMS data directory. By default it is /var/spool/pandora/data\_in/
|
Help example :
[](https://pandorafms.com/guides/public/uploads/images/gallery/2021-05/image-1621868162380.png)
# Manual execution
We can test the plugin from the terminal to see if it works, to check it, we run the plugin:
[](https://pandorafms.com/guides/public/uploads/images/gallery/2021-05/image-1622017572016.png)
From windows, we can check it with the following command, calling the .exe:
```
pandora_digitalocean.exe -t --data_dir
```
[](https://pandorafms.com/guides/public/uploads/images/gallery/2021-05/image-1622017624654.png)
# Configuration in Pandora
The best way to manage server plugins in Pandora is from "/usr/share/pandora\_server/util/plugin" so we will send it by pscp to that path:
[](https://pandorafms.com/guides/public/uploads/images/gallery/2021-05/image-1622016210956.png)
If it does not let us run it because we do not have permissions, we must give them with the following command :
```
chmod 755 pandora_digitalocean
```
Once this is done, let's proceed to install it in the Pandora console:
Go to servers > plugins:
[](https://pandorafms.com/guides/public/uploads/images/gallery/2021-05/image-1621930243127.png)
Click on "add":
[](https://pandorafms.com/guides/public/uploads/images/gallery/2021-05/image-1621930276936.png)
We give it a name and, if we want, a description:
[](https://pandorafms.com/guides/public/uploads/images/gallery/2021-05/image-1621930322520.png)
We put in plugin command the path in which we have located previously and in parameters what we want to get, as in this case I only want to generate the agents and the address is already configured only put \_field1\_, if we want to put another address where to save the data generated by the plugin, we would add --data\_dir \_field2\_ in plugin parameters. We will put a description (token, for example) and in default value we will put the token generated before. Once this is done, two agents with their respective modules will have been created.
[](https://pandorafms.com/guides/public/uploads/images/gallery/2021-05/image-1622016246217.png)
# Modules generated by the plugin
Two new agents will be created:
[](https://pandorafms.com/guides/public/uploads/images/gallery/2021-05/image-1621930502395.png)
In the first one, information about your droplets will be displayed, in the second one, information about your digital ocean account.
**Digital Account droplets**
Droplet\_disk | Disk info |
Droplet\_memory | Memory info |
Droplet\_name | Droplet name |
Droplet\_status | To find out if the droplet is active |
Droplet\_vcpus | Information about vcpus |
Example on console :
[](https://pandorafms.com/guides/public/uploads/images/gallery/2021-05/image-1621869930146.png)
**Digital\_Ocean\_Account <email>**
Account\_balance | Account balance in $ |
Digital\_Ocean\_Status | The status of the digital ocean account |
Month\_to\_date\_balance | Balance of the month to date |
Example in the Pandora console :
[](https://pandorafms.com/guides/public/uploads/images/gallery/2021-05/image-1621870180347.png)