Skip to main content

HMS Netbiter Argos RestAPI

Pack Assets​

Templates​

The Centreon Monitoring Connector HMS Netbiter Argos RestAPI brings a host template:

  • HW-Device-Hms-Netbiter-Argos-Restapi-custom

It brings the following service templates:

Service AliasService TemplateService DescriptionDefaultDiscovery
AlarmsHW-Device-Hms-Netbiter-Argos-Alarms-RestapiCheck system's alarmsX
Sensors-GlobalHW-Device-Hms-Netbiter-Argos-Sensors-Global-RestapiCheck sensorsX

Default services are automatically created when the host template is applied.

If Discovery is checked, it means a service discovery rule exists for this service template.

Discovery rules​

Rule NameDescription
Netbiter Argos RestAPI SystemsDiscover HMS/Ewon Netbiter Systems using Argos RestAPI

More information about discovering hosts automatically is available on the dedicated page.

Collected metrics & status​

Metric NameUnit
alarm.duration.secondss
alarms.total.countcount
alarm-activeN/A
alarm-ackedN/A
alarm-severityN/A

Setup​

Monitoring Pack​

If the platform uses an online license, you can skip the package installation instruction below as it is not required to have the pack displayed within the Configuration > Monitoring Connector Manager menu. If the platform uses an offline license, install the package on the central server with the command corresponding to the operating system's package manager:

dnf install centreon-pack-hardware-devices-hms-netbiter-argos-restapi

Whatever the license type (online or offline), install the HMS Netbiter Argos RestAPI Pack through the Configuration > Monitoring Connector Manager menu.

Plugin​

Since Centreon 22.04, you can benefit from the 'Automatic plugin installation' feature. When this feature is enabled, you can skip the installation part below.

You still have to manually install the plugin on the poller(s) when:

  • Automatic plugin installation is turned off
  • You want to run a discovery job from a poller that doesn't monitor any resource of this kind yet

More information in the Installing the plugin section.

Use the commands below according to your operating system's package manager:

dnf install centreon-plugin-Hardware-Devices-Hms-Netbiter-Argos-Restapi

Configuration​

Host​

  1. Log into Centreon and add a new host through Configuration > Hosts.
  2. Fill the Name & Alias & IP Address/DNS fields according to your ressource settings.
  3. Set the Netbiter API FQDN (generally api.netbiter.net) as IP Address/DNS.
  4. Apply the HW-Device-Hms-Netbiter-Argos-Restapi-custom-custom template to the host
  5. Once the template is applied, fill in the corresponding macros. Some macros are mandatory.
MandatoryMacroDescriptionDefault
APIACCESSKEYFor Access Key "direct" authentication method. Example: --access-key='ABCDEFG1234567890'
APIPASSWORDFor Username/Password authentication method. Must be used with --api-password option
XAPIPORTPort used443
XAPIPROTOSpecify https if neededhttps
APIUSERNAMEFor Username/Password authentication method. Must be used with --api-password option
PROXYURLProxy URL
XSYSTEMIDSet the Netbiter Argos System ID
EXTRAOPTIONSAny extra option you may want to add to every command line (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's CLI using the centreon-engine user account (su - centreon-engine) and test the plugin by running the following command:

/usr/lib/centreon/plugins/centreon_hms_netbiter_argos_restapi.pl \
--plugin=hardware::devices::hms::netbiter::argos::restapi::plugin \
--mode=alarms \
--hostname='api.netbiter.net' \
--port='443' \
--proto='https' \
--proxyurl='' \
--access-key='ABCDEFG1234567890' \
--system-id='XYZ123' \
--warning-alarms-total='1' \
--critical-alarms-total='2'

The expected command output is shown below:

OK: Alarms: total current: 0 | 'alarms.total.count'=0;;;0 ;;;;;

Available modes​

All available modes can be displayed by adding the --list-mode parameter to the command:

/usr/lib/centreon/plugins/centreon_hms_netbiter_argos_restapi.pl \
--plugin=hardware::devices::hms::netbiter::argos::restapi::plugin \
--list-mode

The plugin brings the following modes:

ModeLinked service template
alarmsHW-Device-Hms-Netbiter-Argos-Alarms-Restapi
discoveryNot used in this Plugin Pack
list-sensorsUsed for service discovery
sensorsHW-Device-Hms-Netbiter-Argos-Sensors-Global-Restapi

Available options​

Global options​

All global options are listed here:

OptionDescriptionType
--modeChoose a mode.Global
--dyn-modeSpecify a mode with the path (separated by '::').Global
--list-modeList available modes.Global
--mode-versionCheck minimal version of mode. If not, unknown error.Global
--versionDisplay plugin version.Global
--custommodeChoose a custom mode.Global
--list-custommodeList available custom modes.Global
--multipleMultiple custom mode objects (required by some specific modes)Global
--pass-managerUse a password manager.Global
--verboseDisplay long output.Output
--debugDisplay also debug messages.Output
--filter-perfdataFilter perfdata that match the regexp.Output
--filter-perfdata-advAdvanced perfdata filter. Eg: --filter-perfdata-adv='not (%(value) == 0 and %(max) eq "")'Output
--explode-perfdata-maxPut max perfdata (if it exist) in a specific perfdata (without values: same with '_max' suffix) (Multiple options)Output
--change-perfdata --extend-perfdataChange or extend perfdata. Syntax: --extend-perfdata=searchlabel,newlabel,target[,[newuom],[min],[m ax]] Common examples: Change storage free perfdata in used: --change-perfdata=free,used,invert() Change storage free perfdata in used: --change-perfdata=used,free,invert() Scale traffic values automaticaly: --change-perfdata=traffic,,scale(auto) Scale traffic values in Mbps: --change-perfdata=traffic_in,,scale(Mbps),mbps Change traffic values in percent: --change-perfdata=traffic_in,,percent()Output
--extend-perfdata-groupExtend perfdata from multiple perfdatas (methods in target are: min, max, average, sum) Syntax: --extend-perfdata-group=searchlabel,newlabel,target[,[newuom],[m in],[max]] Common examples: Sum wrong packets from all interfaces (with interface need --units-errors=absolute): --extend-perfdata-group=',packets_wrong,sum(packets_(discard |error)_(in|out))' Sum traffic by interface: --extend-perfdata-group='traffic_in_(.*),traffic_$1,sum(traf fic_(in|out)_$1)'Output
--change-short-output --change-long-outputChange short/long output display: --change-short-output=pattern~replace~modifierOutput
--change-exitChange exit code: --change-exit=unknown=criticalOutput
--range-perfdataChange perfdata range thresholds display: 1 = start value equals to '0' is removed, 2 = threshold range is not display.Output
--filter-uomFilter UOM that match the regexp.Output
--opt-exitOptional exit code for an execution error (i.e. wrong option provided, SSH connection refused, timeout, etc) (Default: unknown).Output
--output-ignore-perfdataRemove perfdata from output.Output
--output-ignore-labelRemove label status from output.Output
--output-xmlDisplay output in XML format.Output
--output-jsonDisplay output in JSON format.Output
--output-openmetricsDisplay metrics in OpenMetrics format.Output
--output-fileWrite output in file (can be used with json and xml options)Output
--disco-formatDisplay discovery arguments (if the mode manages it).Output
--disco-showDisplay discovery values (if the mode manages it).Output
--float-precisionSet the float precision for thresholds (Default: 8).Output
--source-encodingSet encoding of monitoring sources (In some case. Default: 'UTF-8'). Netbiter Argos RestAPIOutput
--hostnameArgos API hostname (Default: api.netbiter.net).Api
--portPort used (Default: 443)Api
--protoSpecify https if needed (Default: 'https')Api
--api-endpointArgos API requests endpoint (Default: '/operation/v1/rest/json')Api
--access-keyFor Access Key "direct" authentication method. Example: --access-key='ABCDEFG1234567890'Api
--api-usernameFor Username/Password authentication method. Must be used with --api-password option.Api
--api-passwordFor Username/Password authentication method. Must be used with --api-username option.Api
--timeoutSet timeout in seconds (Default: 10).Api
--http-peer-addrSet the address you want to connect (Useful if hostname is only a vhost. no ip resolve)Http global
--proxyurlProxy URLHttp global
--proxypacProxy pac file (can be an url or local file)Http global
--insecureInsecure SSL connections.Http global
--http-backendSet the backend used (Default: 'lwp') For curl: --http-backend=curlHttp global
--ssl-optSet SSL Options (--ssl-opt="SSL_version => TLSv1" --ssl-opt="SSL_verify_mode => SSL_VERIFY_NONE").Backend lwp
--sslSet SSL version (=TLSv1).Backend lwp
--curl-optSet CURL Options (--curl-opt="CURLOPT_SSL_VERIFYPEER => 0" --curl-opt="CURLOPT_SSLVERSION => CURL_SSLVERSION_TLSv1_1" ).Backend curl
--memcachedMemcached server to use (only one server).Retention
--redis-serverRedis server to use (only one server). SYntax: address[:port]Retention
--redis-attributeSet Redis Options (--redis-attribute="cnx_timeout=5").Retention
--redis-dbSet Redis database index.Retention
--failback-fileFailback on a local file if redis connection failed.Retention
--memexpirationTime to keep data in seconds (Default: 86400).Retention
--statefile-dirDirectory for statefile (Default: '/var/lib/centreon/centplugins').Retention
--statefile-suffixAdd a suffix for the statefile name (Default: '').Retention
--statefile-concat-cwdConcat current working directory with option '--statefile-dir'. Useful on Windows when plugin is compiled.Retention
--statefile-formatFormat used to store cache (can be: 'dumper', 'storable', 'json').Retention
--statefile-keyKey to encrypt/decrypt cache.Retention
--statefile-cipherCipher to encrypt cache (Default: 'AES').Retention

Modes options​

All modes specific options are listed here:

OptionDescriptionType
--filter-activeOnly show active alarms.Mode
--system-idSet the Netbiter Argos System ID (Mandatory).Mode
--filter-ackedHide acknowledged alarms.Mode
--filter-activeOnly show active alarms.Mode
--filter-severityOnly show alarms with a given severity level. Can be: 'critical', 'major', 'minor', 'warning', 'cleared'. Only one value can be set (no multiple values).Mode
--warning-active-statusSet warning threshold for active status (Default: ''). Typical syntax: --warning-active-status='%{active} =~ "true"'Mode
--critical-active-statusSet critical threshold for active status (Default: '%{active} =~ "true"'). Typical syntax: --critical-active-status='%{active} =~ "true"'Mode
--warning-acked-statusSet warning threshold for acked status (Default: '%{acked} =~ "false"'). Typical syntax: --warning-acked-status='%{acked} =~ "false"'Mode
--critical-acked-statusSet critical threshold for acked status (Default: ''). Typical syntax: --critical-acked-status='%{acked} =~ "false"'Mode
--warning- --critical-Thresholds. Can be: 'warning-alarms-total' (count) 'critical-alarms-total' (count), 'warning-alarm-duration' (s), 'critical-alarm-duration' (s), 'warning-alarm-severity' (level from 0 to 5), critical-alarm-severity (level from 0 to 5).Mode

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

/usr/lib/centreon/plugins//centreon_hms_netbiter_argos_restapi.pl \
--plugin=hardware::devices::hms::netbiter::argos::restapi::plugin \
--mode=alarms \
--help

Troubleshooting​

Please find the troubleshooting documentation for the API-based plugins in this chapter.