Skip to main content

Protocols and Credentials

This page provides the full reference for configuring protocols in MetricsHub. Each protocol section includes the available parameters and a complete YAML example.

Choosing a Protocol

ProtocolBest ForAuthentication
HTTPREST APIs, web services, storage systemsUsername/password
ICMP PingBasic reachability checksNone
IPMIOut-of-band management (BMC, iLO, iDRAC)Username/password
JDBCDatabase monitoringUsername/password
JMXJava application monitoringUsername/password (optional)
OS CommandsLocal system monitoringsudo (optional)
SSHLinux/Unix remote monitoringUsername/password or private key
SNMP v1/v2cNetwork devices, legacy systemsCommunity string
SNMP v3Network devices (secure)Username/password with encryption
WBEMVMware, storage systemsUsername/password
WMIWindows systems (local or domain)Username/password
WinRMWindows remote managementUsername/password

Setting Procotol(s)

HTTP

Use the parameters below to configure the HTTP protocol:

ParameterDescription
httpsWhether to use encryption (false for HTTP, true for HTTPS).
hostnameThe name or IP address of the resource. If not specified, the host.name attribute will be used.
portThe HTTPS port number used to perform HTTP requests (Default: 443).
usernameName used to establish the connection with the host via the HTTP protocol.
passwordPassword used to establish the connection with the host via the HTTP protocol.
timeoutHow long until the HTTP request times out (Default: 60s).

Example

resourceGroups:
boston:
attributes:
site: boston
resources:
myHost1:
attributes:
host.name: my-host-01
host.type: storage
protocols:
http:
https: true
port: 443
username: myusername
password: mypwd
timeout: 60

ICMP Ping

Use the parameters below to configure the ICMP ping protocol:

ParameterDescription
hostnameThe name or IP address of the resource. If not specified, the host.name attribute will be used.
pingProtocol used to test the host reachability through ICMP.
timeoutHow long until the ping command times out (Default: 5s).

Example

resourceGroups:
boston:
attributes:
site: boston
resources:
myHost1:
attributes:
host.name: my-host-01
host.type: linux
protocols:
ping:
timeout: 10s

IPMI

Use the parameters below to configure the IPMI protocol:

ParameterDescription
ipmiProtocol used to access the host.
hostnameThe name or IP address of the resource. If not specified, the host.name attribute will be used.
usernameName used to establish the connection with the host via the IPMI protocol.
passwordPassword used to establish the connection with the host via the IPMI protocol.

Example

resourceGroups:
boston:
attributes:
site: boston
resources:
myHost1:
attributes:
host.name: my-host-01
host.type: oob
protocols:
ipmi:
username: myusername
password: mypwd

JDBC

Use the parameters below to configure JDBC to connect to a database:

ParameterDescription
jdbcJDBC configuration used to connect to a database on the host
hostnameThe name or IP address of the resource. If not specified, the host.name attribute will be used.
timeoutHow long until the SQL query times out (Default: 120s).
usernameName used to authenticate against the database.
passwordPassword used to authenticate against the database.
urlThe JDBC connection URL to access the database.
typeThe type of database (e.g., Oracle, PostgreSQL, MSSQL, Informix, Derby, H2).
portThe port number used to connect to the database.
databaseThe name of the database instance to connect to on the server.

Example

resourceGroups:
boston:
attributes:
site: boston
resources:
db-host:
attributes:
host.name: my-host-02
host.type: win
protocols:
jdbc:
hostname: my-host-02
username: dbuser
password: dbpassword
url: jdbc:mysql://my-host-02:3306
timeout: 120s
type: mysql
port: 3306

JMX

Use the parameters below to configure the JMX protocol:

ParameterDescription
jmxJMX configuration used to access the host.
hostnameThe name or IP address of the resource. If not specified, the host.name attribute will be used.
timeoutHow long until the JMX query times out (Default: 30s).
usernameName used to authenticate against the JMX service.
passwordPassword used to authenticate against the JMX service.
portThe port number used to connect to the JMX service (Default: 1099).

Example

resourceGroups:
boston:
attributes:
site: boston
resources:
db-host:
attributes:
host.name: cassandra-01
host.type: linux
protocols:
jmx:
timeout: 30s
port: 7199

OS Commands

Use the parameters below to configure OS Commands that are executed locally:

ParameterDescription
osCommandProtocol used to access the host.
hostnameThe name or IP address of the resource. If not specified, the host.name attribute will be used.
timeoutHow long until the local OS Commands time out (Default: 120s).
useSudoWhether sudo is used or not for the local OS Command: true or false (Default: false).
useSudoCommandsList of commands for which sudo is required.
sudoCommandSudo command to be used (Default: sudo).

Example

resourceGroups:
boston:
attributes:
site: boston
resources:
myHost1:
attributes:
host.name: my-host-01
host.type: linux
protocols:
osCommand:
timeout: 120
useSudo: true
useSudoCommands: [cmd1, cmd2]
sudoCommand: sudo

SSH

Use the parameters below to configure the SSH protocol:

ParameterDescription
sshProtocol used to access the host.
hostnameThe name or IP address of the resource. If not specified, the host.name attribute will be used.
timeoutHow long until the command times out (Default: 120s).
portThe SSH port number to use for the SSH connection (Default: 22).
useSudoWhether sudo is used or not for the SSH Command (true or false).
useSudoCommandsList of commands for which sudo is required.
sudoCommandSudo command to be used (Default: sudo).
usernameName to use for performing the SSH query.
passwordPassword to use for performing the SSH query.
privateKeyPrivate Key File to use to establish the connection to the host through the SSH protocol.

Example

resourceGroups:
boston:
attributes:
site: boston
resources:
myHost1:
attributes:
host.name: my-host-01
host.type: linux
protocols:
ssh:
timeout: 120
port: 22
useSudo: true
useSudoCommands: [cmd1, cmd2]
sudoCommand: sudo
username: myusername
password: mypwd
privateKey: /tmp/ssh-key.txt

SNMP

Use the parameters below to configure the SNMP protocol (versions 1 and 2c):

ParameterDescription
snmpProtocol used to access the host.
hostnameThe name or IP address of the resource. If not specified, the host.name attribute will be used.
versionThe version of the SNMP protocol (v1, v2c).
communityThe SNMP Community string to use to perform SNMP v1 queries (Default: public).
portThe SNMP port number used to perform SNMP queries (Default: 161).
timeoutHow long until the SNMP request times out (Default: 120s).

Example

resourceGroups:
boston:
attributes:
site: boston
resources:
myHost1:
attributes:
host.name: my-host-01
host.type: linux
protocols:
snmp:
version: v1
community: public
port: 161
timeout: 120s

myHost2:
attributes:
host.name: my-host-02
host.type: linux
protocols:
snmp:
version: v2c
community: public
port: 161
timeout: 120s

SNMP Version 3

Use the parameters below to configure the SNMP version 3 protocol:

ParameterDescription
snmpv3Protocol used to access the host using SNMP version 3.
hostnameThe name or IP address of the resource. If not specified, the host.name attribute will be used.
timeoutHow long until the SNMP request times out (Default: 120s).
portThe SNMP port number used to perform SNMP version 3 queries (Default: 161).
contextNameThe name of the SNMP version 3 context, used to identify the collection of management information.
authTypeThe SNMP version 3 authentication protocol (MD5, SHA, SHA224, SHA256, SHA512, SHA384 or NoAuth) to ensure message authenticity.
privacyThe SNMP version 3 privacy protocol (DES, AES, AES192, AES256 or NONE) used to encrypt messages for confidentiality.
usernameThe username used for SNMP version 3 authentication.
privacyPasswordThe password used to encrypt SNMP version 3 messages for confidentiality.
passwordThe password used for SNMP version 3 authentication.
retryIntervalsThe intervals (in milliseconds) between SNMP request retries.

Example

resourceGroups:
boston:
attributes:
site: boston
resources:
myHost3:
attributes:
host.name: my-host-03
host.type: linux
protocols:
snmpv3:
port: 161
timeout: 120s
contextName: myContext
authType: SHA
privacy: AES
username: myUser
privacyPassword: myPrivacyPassword
password: myAuthPassword

WBEM

Use the parameters below to configure the WBEM protocol:

ParameterDescription
wbemProtocol used to access the host.
hostnameThe name or IP address of the resource. If not specified, the host.name attribute will be used.
protocolThe protocol used to access the host.
portThe HTTPS port number used to perform WBEM queries (Default: 5989 for HTTPS or 5988 for HTTP).
timeoutHow long until the WBEM request times out (Default: 120s).
usernameName used to establish the connection with the host via the WBEM protocol.
passwordPassword used to establish the connection with the host via the WBEM protocol.
vcentervCenter hostname providing the authentication ticket, if applicable.

Example

resourceGroups:
boston:
attributes:
site: boston
resources:
myHost1:
attributes:
host.name: my-host-01
host.type: storage
protocols:
wbem:
protocol: https
port: 5989
timeout: 120s
username: myusername
password: mypwd

WMI

Use the parameters below to configure the WMI protocol:

ParameterDescription
wmiProtocol used to access the host.
hostnameThe name or IP address of the resource. If not specified, the host.name attribute will be used.
timeoutHow long until the WMI request times out (Default: 120s).
usernameName used to establish the connection with the host via the WMI protocol.
passwordPassword used to establish the connection with the host via the WMI protocol.

Example

resourceGroups:
boston:
attributes:
site: boston
resources:
myHost1:
attributes:
host.name: my-host-01
host.type: win
protocols:
wmi:
timeout: 120s
username: myusername
password: mypwd

WinRM

Use the parameters below to configure the WinRM protocol:

ParameterDescription
winrmProtocol used to access the host.
hostnameThe name or IP address of the resource. If not specified, the host.name attribute will be used.
timeoutHow long until the WinRM request times out (Default: 120s).
usernameName used to establish the connection with the host via the WinRM protocol.
passwordPassword used to establish the connection with the host via the WinRM protocol.
protocolThe protocol used to access the host: HTTP or HTTPS (Default: HTTP).
portThe port number used to perform WQL queries and commands (Default: 5985 for HTTP or 5986 for HTTPS).
authenticationsOrdered list of authentication schemes: NTLM, KERBEROS (Default: NTLM).

Example

resourceGroups:
boston:
attributes:
site: boston
resources:
myHost1:
attributes:
host.name: my-host-01
host.type: win
protocols:
winrm:
protocol: http
port: 5985
username: myusername
password: mypwd
timeout: 120s
authentications: [ntlm]

Common Protocol Examples

Windows via WMI:

resources:
windows-server:
attributes:
host.name: win-server-01
host.type: win
protocols:
wmi:
username: administrator
password: changeme
timeout: 120s

Network device via SNMP:

resources:
network-switch:
attributes:
host.name: switch-01.example.com
host.type: network
protocols:
snmp:
version: v2c
community: public
port: 161
timeout: 120s

Storage via HTTP REST API:

resources:
storage-array:
attributes:
host.name: storage-01.example.com
host.type: storage
protocols:
http:
https: true
port: 443
username: admin
password: changeme