# Digital Ocean Discovery # Introduction **The purpose of this plugin is to monitor Digital Ocean droplets**, using key metrics regarding CPU, memory, disk, bandwith and their status, which are essential to control and track these resources. The plugin connects to the Digital Ocean REST API and monitors the environment using the aforementioned metrics, generating an agent for each zone and instance via XML that is sent to the Pandora server. # Prerrequisites - Digital Ocean API Connectivity # Parameters **Parameters**
--confFile path configuration
**Conf file path configuration** ``` token = agents_group_name = < Name of the target group for the created agents > threads = interval = < Interval in seconds for agents > use_prefix = < Enable with 1 to enable use of prefixes > prefix = applicate_project = < Enable with 1 to be able to specify a project to target > filter_project = transfer_mode = tentacle data_dir = /var/spool/pandora/data_in tentacle_ip = < IP of the target machine for the created agents > tentacle_port = discard_activate = < Activate with 1 to be able to specify droplets to discard in monitoring > discard_droplets = < Specifies droplets to discard, example: ["droplet1","droplet2"] ``` **Example** ``` token = dop_v1_JSUzI1NiIsImtpZCI6IkVpeVhfTFFzSWpmcGtjZzM0blZrZDY3YUtMbzNqTWZmcmdLZ2NKbl agents_group_name = Applications threads = 2 interval = 300 use_prefix = 1 prefix = DigitalOcean. applicate_project = 1 filter_project = SeraCents transfer_mode = tentacle data_dir = /var/spool/pandora/data_in tentacle_ip = 172.42.42.101 tentacle_port = 41121 discard_activate = 1 discard_droplets = ["ubuntu-s-1vcpu-1gb-sfo3-01","ubuntu-s-1vcpu-4gb-sfo3-03"] ``` # Manual execution The plugin execution format is as follows: ``` ./pandora_digitalocean --conf < path to configuration file > ``` Example: ``` ./pandora_digitalocean --conf /usr/share/pandora_server/util/plugin/digitalocean.conf ``` The execution will return an output in JSON format with information about the execution, and will generate an XML file for each monitored agent that will be sent to the Pandora FMS server by the transfer method indicated in the configuration. For example: ``` {"summary": {"Total agents": 18}} ``` # Discovery This plugin can be integrated with Pandora FMS Discovery. To do this, you must load the ".disco" package that you can download from the Pandora FMS library: [https://pandorafms.com/library/](https://pandorafms.com/library/) [![image.png](https://pandorafms.com/guides/public/uploads/images/gallery/2024-03/scaled-1680-/bUeimage.png)](https://pandorafms.com/guides/public/uploads/images/gallery/2024-03/bUeimage.png) Once loaded, Kubernetes environments can be monitored by creating Discovery tasks from the Management > Discovery > App section For each task, the following minimum data will be requested: - **Digital Ocean Token:** Digital Ocean Token. - **Use prefix**: For use a prefix in the agents. - **Filter project :** For specificate a project. - **Discard droplets :** For discard a droplet. - **Max threads:** The number maximun of threads - **Tentacle IP**: Tentacle IP, server - **Tentacle port**: Tentacle port [![image.png](https://pandorafms.com/guides/public/uploads/images/gallery/2024-03/scaled-1680-/HE3image.png)](https://pandorafms.com/guides/public/uploads/images/gallery/2024-03/HE3image.png) Successfully completed tasks will have a run summary with the following information: - **Total agents**: Total number of agents generated by the task. [![image.png](https://pandorafms.com/guides/public/uploads/images/gallery/2024-03/scaled-1680-/i97image.png)](https://pandorafms.com/guides/public/uploads/images/gallery/2024-03/i97image.png) # Agents and modules generated by the plugin Running the plugin will create the following agents and modules: - Global agent
< prefix ><Digital Ocean >
**Modules**
Account balance
Droplets
Month to data balance
Month to date usage
- **A agent for droplet**
< prefix >< Nombre Droplet >
**Modules**
Status
Cpu %
Mem %
Load 1
Load 5
Load 15
Public inbound
Public outbound
Private inbound
Private outbound
< Name last backup >
< Name last snapshot >
< Name disk > %