Skip to main content

Absyss VTOM Rest API

Pack Assets​

Templates​

The Centreon Pack VTOM brings 1 host template:

  • App-Vtom-Restapi-custom

It brings the following Service Templates:

Service AliasService TemplateDefaultDiscovery
CacheApp-Vtom-Cache-Restapi
JobsApp-Vtom-Jobs-RestapiXX

Discovery rules​

Rule nameDescription
App-Vtom-Restapi-Job-NameDiscover jobs and monitor status

Collected metrics & status​

Metric nameDescriptionUnit
jobs.running.countNumber of jobs with status running
jobs.errors.countNumber of jobs with status errors
jobs.waiting.countNumber of jobs with status waiting
jobs.finished.countNumber of jobs with status finished
jobs.notscheduled.countNumber of jobs with status not scheduled
jobs.descheduled.countNumber of jobs with status descheduled
job statusCurrent status of the job
job long statusCurrent duration of the running job
environment~application~job_name#job.success.percentageSuccess rate for the last 10 job executions (status finished and errors)%

Prerequisites​

To control your VTOM, the Rest API must be configured.

The Pack supports following authentication:

  • username/password
  • direct token

At least VTOM 6.6.1a is mandatory for the Pack:

  • /auth/1.0/authorize
  • /monitoring/1.0/jobs/status

For previous VTOM version, please use legacy Plugin mode.

Setup​

  1. Install the Centreon package on every Centreon poller expected to monitor VTOM Rest API resources:
yum install centreon-plugin-Applications-Vtom-Restapi
  1. On the Centreon Web interface, install the VTOM Rest API Centreon Pack on the Configuration > Monitoring Connector Manager page.

Configuration​

Host​

  • Log into Centreon and add a new Host through Configuration > Hosts
  • Fill the Name, Alias & IP Address / DNS fields according to your VTOM Rest API server settings
  • Select the App-Vtom-Restapi-custom template to apply to the Host

Once the template is applied, some Macros have to be configured:

MandatoryNameDescription
XVTOMCUSTOMMODEAccess mode for the Plugin (default: 'api'. Can be: 'legacy')
XVTOMAPIPORTPort used (Default: 30002)
XVTOMAPIPROTOSpecify http if needed (default: 'https')
XVTOMAPITOKENApi token
XVTOMAPIUSERNAMEApi username
XVTOMAPIPASSWORDApi password
VTOMAPIEXTRAOPTIONSAny extra option you may want to add to the command (eg. a --verbose flag)

How to check in the CLI that the configuration is OK and what are the main options for?​

Once the plugin is installed, log into your Centreon Poller CLI using the centreon-engine user account and test the Plugin by running the following command:

/usr/lib/centreon/plugins/centreon_vtom_restapi.pl \
--plugin=apps::vtom::restapi::plugin \
--mode=jobs \
--hostname='10.0.0.1' \
--api-username='my-username' \
--api-password='my-password' \
--filter-application='' \
--filter-environment='' \
--filter-name='' \
--verbose

The expected command output is shown below:

CRITICAL: job 'env_1/app_6/job_1' status: error [message: Traitement en erreur (1)] - job 'env_1/app_7/job_2' status: error [message: Traitement en erreur (1)] - job 'env_2/app_6/job_1' status: error [message: Traitement en erreur (1)] - job 'env_2/app_7/job_2' status: error [message: Traitement en erreur (1)] | 'jobs.running.count'=4;;;0;18 'jobs.errors.count'=4;;;0;18 'jobs.waiting.count'=4;;;0;18 'jobs.finished.count'=2;;;0;18 'jobs.notscheduled.count'=2;;;0;18 'jobs.descheduled.count'=2;;;0;18 'env_1~app_5~job_1#job.success.percentage'=100%;;;0;100 'env_2~app_5~job_1#job.success.percentage'=100%;;;0;100
job 'env_1/app_1/job_1' status: notscheduled
job 'env_1/app_2/job_1' status: waiting
job 'env_1/app_3/job_1' status: descheduled
job 'env_1/app_4/job_1' status: running [message: Job en cours d'execution, pid 29592 (ipid 210)], started since: 19h 37m 15s
job 'env_1/app_5/job_1' status: finished [message: Traitement termine (0)], success: 100.00 %
job 'env_1/app_6/job_1' status: error [message: Traitement en erreur (1)]
job 'env_1/app_7/job_1' status: running [message: L'agent nohost (nohost:37714) est ignore car une erreur recente a ete detectee (attente 63s)], started since: 19h 22m 52s
job 'env_1/app_7/job_2' status: error [message: Traitement en erreur (1)]
job 'env_1/app_7/job_3' status: waiting [message: Heure de demarrage non atteinte]
job 'env_2/app_1/job_1' status: notscheduled
job 'env_2/app_2/job_1' status: waiting
job 'env_2/app_3/job_1' status: descheduled
job 'env_2/app_4/job_1' status: running [message: Job en cours d'execution, pid 29651 (ipid 211)], started since: 19h 35m 58s
job 'env_2/app_5/job_1' status: finished [message: Traitement termine (0)], success: 100.00 %
job 'env_2/app_6/job_1' status: error [message: Traitement en erreur (1)]
job 'env_2/app_7/job_1' status: running [message: Impossible de se connecter a l'agent 'nohost' (nohost:37714) tentative 2/2], started since: 19h 26m 52s
job 'env_2/app_7/job_2' status: error [message: Traitement en erreur (1)]
job 'env_2/app_7/job_3' status: waiting [message: Heure de demarrage non atteinte]

All available options for a given mode can be displayed by adding the --help parameter to the command:

/usr/lib/centreon/plugins/centreon_vtom_restapi.pl \
--plugin=apps::vtom::restapi::plugin \
--mode=jobs \
--help

All available options for a given mode can be displayed by adding the --list-mode parameter to the command:

/usr/lib/centreon/plugins/centreon_vtom_restapi.pl \
--plugin=apps::vtom::restapi::plugin \
--list-mode

Troubleshooting​

Please find all the troubleshooting documentation for the Centreon Plugins in the dedicated page