Integrate > Zabbix > Configure

Configure

After installing the OpsCx for Zabbix on the OpsCx host system, execute the following configuration steps:

  1. Configure the OpsCx for Zabbix. See Configuring the Integration topic.
  2. Configure the login credentials. See Configuring Login Credentials topic.
  3. Start the integration services. See Managing the Integration Services topic.
  4. Import and activate policies in OpsCx. See Importing and Activating the Zabbix Policies topic.

Configuring the Integration

To be able to connect to the Zabbix system and to establish a receiving server on the OpsCx system (needed for subscription mode), you need to set the basic options in the configuration files.

  1. Open the appropriate configuration file:

    Windows:

    %OvDataDir%conf\HPBsmIntZabbix\zabbix_events.conf

    %OvDataDir%conf\HPBsmIntZabbix\zabbix_metrics.conf

    %OvDataDir%conf\HPBsmIntZabbix\zabbix_topology.conf

    Linux:

    /var/opt/OV/conf/HPBsmIntZabbix/zabbix_events.conf

    /var/opt/OV/conf/HPBsmIntZabbix/zabbix_metrics.conf

    /var/opt/OV/conf/HPBsmIntZabbix/zabbix_topology.conf

    The options are listed in the section nodes, in the appropriate subsection (source or sink), and formatted as:

    "<option name>" : "<value>",

  2. Search for the option zabbix_server_hostname and set the Zabbix server hostname or IP address.

    For example:

    "zabbix_server_hostname" : "zbxhost1.company.com",

You can set additional options, such as the ports used, number of days for which the old events are collected, the polling interval, and more. For a detailed list of available options for each collector, see Event Collection Options on page 1, Metric Collection Options on page 1, and Topology Collection Options topic.

After you set the hostname, continue with Configuring Login Credentials topic.

You must restart the OpsCx for Zabbix services after any change to the configuration.

Event Collection Options

Windows: %OvDataDir%conf\HPBsmIntZabbix\zabbix_events.conf

Linux: /var/opt/OV/conf/HPBsmIntZabbix/zabbix_events.conf

Option Description
Section: source

zabbix_server_hostname

The Zabbix server hostname or IP address. This parameter is required.
zabbix_server_port

The service name or port used to establish the connection with the Zabbix server. The default ports are 80 for HTTP and 443 for HTTPS.

Default: 80

zabbix_server_protocol

The protocol used to communicate with Zabbix. You need to change it to https if Zabbix is configured to use HTTPS.

Default: http

interval

The time (in seconds) to wait after collecting the data

Default: 60

zabbix_event_timestamp_filename

Timestamp persistency filename.

Default: /var/opt/OV/tmp/HPBsmIntZabbix/zabbix_event_timestamp.txt (Linux)
${OvDataDir}/tmp/HPBsmIntZabbix/zabbix_event_timestamp.txt (Windows)

zabbix_event_init_age

Maximum age of alerts for the initial run. On the initial run (without having a timestamp file), the integration will fetch alerts with modification timestamp not older than the given age (in minutes).

Default: 120

filename

The name of the Lua script which processes events data.

Default: /var/opt/OV/installation/HPBsmIntZabbix/lib/zabbix_events.lua (Linux)
${OvDataDir}/installation/HPBsmIntZabbix/lib/zabbix_events.lua (Windows)

package-path

Additional search path for Lua modules.

Default: $/var/opt/OV/installation/HPBsmIntZabbix/lib/?.lua (Linux)
${OvDataDir}/installation/HPBsmIntZabbix/lib/?.lua (Windows)

host_nodes_list_filename

The host node list used for data output filtering. When a node does not exist in the list, the integration adds it to the list and forwards it. Otherwise, it forwards the node (or its child, metric, or event data) only if it is present with the index different from 0.

The following syntax is used in the file:

<index>, <id>, <friendly_name>

Where:

  • index has the following values: 0 - ignore; 1 - push
  • friendly_name is used to determine which nodes you would like to push and which to ignore.

Do not change the id values.

Default: /var/opt/OV/tmp/HPBsmIntZabbix/host_nodes_list.txt (Linux)
${OvDataDir}/tmp/HPBsmIntZabbix/host_nodes_list.txt (Windows)

Section: sink

use-ssl

If set to true, the connections will be encrypted using SSL v3.

Default: true

uri

The URI to send the web service request to. The string must not contain the protocol, hostname or port fields but only the URI part of an URL.

Default: /bsmc/rest/events/HPBsmIntZabbix

server-name

Hostname or IP address of the remote OpsCx host.

Default: localhost

port

The service name or port to use for establishing the connection.

Default: 30005

use-persistency

If set to true, all incoming messages will first be persisted into a file-based store before sending them to the remote host. It also enables the retry mechanism.

Default: true

persistency-dir

Directory path, used for the persistence layer. Directory must exist.

Default: /var/opt/OV/tmp/HPBsmIntZabbix (Linux)
${OvDataDir}\tmp\HPBsmIntZabbix (Windows)

persistency-max-size

File size limit (in KB), which needs to be exceeded before the persistence layer starts writing into a new output file.

Default: 10240

persistency-max-files

Maximum number of persistence files to keep.

Default: 10

persistency-prefix

Prefix for the persistence files. This will be used for looking up existing persistence files on program start.

Default: Zabbix-events

retry-wait

Amount of seconds to wait before retrying to send an HTTP request, in case of an error. The retry mechanism requires the parameter use-persistency to be set to true.

Default: 30

auth-username

Username for authentication against the remote web service endpoint. If use-store is set to true, the string specified in this parameter will be used as key for fetching the user name from the credential store.

auth-password

Password for the authentication. If use-store is set to true, the string specified in this parameter will be used as key for fetching the password from the credential store.

root-element

Name of the XML root element

Default: Zabbix_event_message

use-store

The option that, when set to true, causes OpsCx for Zabbix to obtain the authentication credentials from the GenInt keystore rather than from the integration configuration file. In this case, the values of the auth-username and auth-password options are used as the credential string IDs inside the keystore. Enable secure communication by using the SSL protocol to prevent the authentication credentials from being sent unencrypted to the OpsCx for Zabbix host.

The option is by default not visible in the configuration file and you need to add it to change the value.

Default value: false

Metric Collection Options

Windows: %OvDataDir%conf\HPBsmIntZabbix\zabbix_metrics.conf

Linux: /var/opt/OV/conf/HPBsmIntZabbix/zabbix_metrics.conf

Option Description
Section: source
zabbix_server_hostname

The Zabbix server hostname or IP address. This parameter is required.

zabbix_server_port

The service name or port used to establish the connection with the Zabbix server. The default ports are 80 for HTTP and 443 for HTTPS.

Default: 80

zabbix_server_protocol

The protocol used to communicate with Zabbix. You need to change it to https if Zabbix is configured to use HTTPS.

Default: http

filename

The name of the Lua script which processes events data.

Default: ${OvDataDir}\installation\HPBsmIntZabbix\lua\
metriccollector.lua
(Windows)
/var/opt/OV/installation/HPBsmIntZabbix/lib/zabbix_metrics.lua (Linux)

package-path

Additional search path for Lua modules.

Default: /var/opt/OV/installation/HPBsmIntZabbix/lib/?.lua (Linux)
${OvDataDir}\installation\HPBsmIntZabbix\lua\?.lua (Windows)

zabbix-metric-keys

Specifies which metrics the integration should try to fetch. See the Zabbix documentation for a list of supported keys. You can find the list at https://www.zabbix.com/documentation/<version>/manual/appendix/
items/supported_by_platform
.

Where <version> is the Zabbix version, for example 2.4.

Metric keys must be separated by a pipe (|) character.

Default:

,"zabbix-metric-keys" : "system.cpu.load[percpu,avg1]|system.cpu.load[percpu,avg5]|system.cpu.load[percpu,avg15]|icmppingloss|icmppingsec|vfs.fs.size[/,pfree]|system.cpu.util[,idle]"

zabbix_metric_timestamp_filename

Timestamp persistency filename.

Default: /var/opt/OV/tmp/HPBsmIntZabbix/zabbix_metric_timestamp.txt (Linux)
${OvDataDir}\tmp\HPBsmIntZabbix\zabbix_metric_timestamp.txt (Windows)

script-interval

Script running interval in seconds.

Default: 300

script-metric-age

The maximum age of metrics to include (in minutes). Keep this value aligned with the value of the option script-interval to prevent data loss or duplication. Default settings run metrics collection every 300 seconds (5 minutes) and also include metrics with the maximum age of 5 minutes.

Default: 5

host_nodes_list_filename

The host node list used for data output filtering. When a node does not exist in the list, the integration adds it to the list and forwards it. Otherwise, it forwards the node (or its child, metric, or event data) only if it is present with the index different from 0.

The following syntax is used in the file:

<index>, <id>, <friendly_name>

Where:

  • index has the following values: 0 - ignore; 1 - push
  • friendly_name is used to determine which nodes you would like to push and which to ignore.

Do not change the id values.

Default: /var/opt/OV/tmp/HPBsmIntZabbix/host_nodes_list.txt (Linux)
${OvDataDir}/tmp/HPBsmIntZabbix/host_nodes_list.txt (Windows)

Section: sink
use-ssl

If set to true, the connections will be encrypted using SSL v3

Default: true

uri

The URI to send the web service request to. The string must not contain the protocol, hostname, or port fields but only the URI part of an URL.

Default: bsmc/rest/metrics/HPBsmIntZabbix

server-name

Hostname or IP address of the remote OpsCx host.

Default: localhost

port

The service name or port to use for establishing the connection.

Default: 30005

use-persistency

If set to true, all incoming messages will first be persisted into a file-based store before sending them to the remote host. It also enables the retry mechanism.

Default: true

persistency-dir

Directory path, used for the persistence layer. Directory must exist.

Default: /var/opt/OV/tmp/HPBsmIntZabbix (Linux)
${OvDataDir}\tmp\HPBsmIntZabbix (Windows)

persistency-max-size

File size limit (in KB), which needs to be exceeded before the persistence layer starts writing into a new output file.

Default: 10240

persistency-max-files

Maximum number of persistence files to keep.

Default: 10

persistency-prefix :

Prefix for the persistence files. This will be used for looking up existing persistence files on program start.

Default:HPBsmIntZabbix-metrics

retry-wait

Amount of seconds to wait before retrying to send an HTTP request, in case of an error. The retry mechanism requires the parameter use-persistency to be set to true.

Default: 30

auth-username

Username for authentication against the remote web service endpoint. If use-store is set to true, the string specified in this parameter will be used as key for fetching the username from the credential store.

auth-password

The password for authentication. If use-store is set to true, the string specified in this parameter will be used as key for fetching the password from the credential store.

root-element

Name of the XML root element.

Default: Zabbix_metric_message

use-store

The option that, when set to true, causes OpsCx for Zabbix to obtain the authentication credentials from the GenInt keystore rather than from the integration configuration file. In this case, the values of the auth-username and auth-password options are used as the credential string IDs inside the keystore. Enable secure communication by using the SSL protocol to prevent the authentication credentials from being sent unencrypted to the OpsCx for Zabbix host.

The option is by default not visible in the configuration file and you need to add it to change the value.

Default value: false

Topology Collection Options

Windows: %OvDataDir%conf\HPBsmIntZabbix\zabbix_topology.conf

Linux: /var/opt/OV/conf/HPBsmIntZabbix/zabbix_topology.conf

 

Related topics

Configuring the Integration

Configuring Login Credentials

Managing the Integration Services

Importing and Activating the Zabbix Policies

Event Collection Options

Metric Collection Options

Topology Collection Options

Configuring Login Credentials

Option Description

Section: source

zabbix_server_hostname

The Zabbix hostname or IP address. This parameter is required.

zabbix_server_port

The service name or port used to establish the connection. The default ports are 80 for HTTP and 443 for HTTPS.

Default: 80

zabbix_server_protocol

The protocol used to communicate with Zabbix. You need to change it to https if Zabbix is configured to use HTTPS.

Default: http

filename

The name of the Lua script which processes topology data.

Default: /var/opt/OV/installation/HPBsmIntZabbix/lib/zabbix_topology.lua (Linux)
${OvDataDir}/installation/HPBsmIntZabbix/lib/zabbix_topology.lua (Windows)

interval

The time (in seconds) to wait after re-running the script.

Default: 3600 (1 hour)

package-path

Additional search path for Lua modules

Default: /var/opt/OV/installation/HPBsmIntZabbix/lib/?.lua (Linux)
${OvDataDir}\installation\HPBsmIntZabbix\lua\?.lua (Windows)

host_nodes_list_filename

The host node list used for data output filtering. When a node does not exist in the list, the integration adds it to the list and forwards it. Otherwise, it forwards the node (or its child, metric, or event data) only if it is present with the index different from 0.

The following syntax is used in the file:

<index>, <id>, <friendly_name>

Where:

  • index has the following values: 0 - ignore; 1 - push
  • friendly_name is used to determine which nodes you would like to push and which to ignore.

Do not change the id values.

Default: /var/opt/OV/tmp/HPBsmIntZabbix/host_nodes_list.txt (Linux)
${OvDataDir}/tmp/HPBsmIntZabbix/host_nodes_list.txt (Windows)

Section: sink (toposink)
filename

The XML output filename.

Default: /var/opt/OV/datafiles/HPBsmIntZabbix/zabbix_topology.xml (Linux)
${OvDataDir}\datafiles\HPBsmIntZabbix\zabbix_topology.xml (Windows)

Section: processor(zabbixselfdiscoveryprocess)
filename

The name of the Lua script file. The file must exist and be a valid Lua script

Default: /var/opt/OV/installation/HPBsmIntZabbix/lib/zabbix_self_discovery.lua (Linux)
${OvDataDir}/installation/HPBsmIntZabbix/lib/zabbix_self_discovery.lua (Windows)

interval

Script running interval in seconds.

Default: 3600

Section: sink(zabbixselfdiscoverysink)
filename

Topology self-discovery output file name

Default: /var/opt/OV/datafiles/HPBsmIntZabbix/zabbix_topology_discovery.xml (Linux)
${OvDataDir}/datafiles/HPBsmIntZabbix/zabbix_topology_discovery.xml (Windows)