Digital Ocean Discovery

This document describes the Digital Ocean functionality of PandoraFMS 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

Parameters

Parameters

--conf File path configuration

Conf file path configuration

token = <Authentication Bearer Token>
agents_group_name = < Name of the target group for the created agents >
threads = <Maximum number of threads used>
interval = < Interval in seconds for agents >
use_prefix = < Enable with 1 to enable use of prefixes >
prefix = <Prefix for agent name>
applicate_project = < Enable with 1 to be able to specify a project to target >
filter_project = <If a project is specified, only these agents will be created>
transfer_mode = tentacle
data_dir = /var/spool/pandora/data_in
tentacle_ip = < IP of the target machine for the created agents >
tentacle_port = <tentacle port, default: 41121>

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/

image.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:

image.png

Successfully completed tasks will have a run summary with the following information:

image.png

Agents and modules generated by the plugin

Running the plugin will create the following agents and modules:

< prefix ><Digital Ocean >

Modules

Account balance 
Droplets
Month to data balance
Month to date usage
< 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 > %