These docs are for v6.6. Click to read the latest docs for v6.7.

Results Exporter

Description

Opsview Results Exporter exports results to services such as Splunk, syslog, local files and arbitrary HTTP endpoints.

Known Issues

When logging data to Rsyslog via TCP, only the first message has the correct priority; subsequent messages use the user.notice priority.

Installation

# Debian
sudo apt-get install opsview-results-exporter
 
# RPM
sudo yum install opsview-results-exporter

Next, ensure that your component configuration (see Configuration section below) contains the correct MessageQueue encoder key, password, and Registry password. These will be the values set when deploying your Opsview system, as specified in /opt/opsview/deploy/etc/user_secrets.yml.

# Once the dependencies are installed, configured and running, 
# run the following command to allow opsview-monit to monitor
# the new component
sudo -iu root /opt/opsview/watchdog/bin/opsview-monit reload

Configuration

The opsview-results-exporter component ships with a default configuration file (/opt/opsview/resultsexporter/etc/resultsexporter.defaults.yaml). Any changes to this file will be overwritten on package updates so you should not edit this file if you want to keep your changes across package updates.

Create /opt/opsview/resultsexporter/etc/resultsexporter.yaml for any custom settings if it does not already exist. resultsexporter.yaml is not overwritten across package updates and overrides settings in resultsexporter.defaults.yaml.

🚧

resultsexporter.yaml permissions

Ensure /opt/opsview/resultsexporter/etc/resultsexporter.yaml is accessible by the opsview group with read permissions.

E.g

chown root:opsview /opt/opsview/resultsexporter/etc/resultsexporter.yaml
chmod 640 /opt/opsview/resultsexporter/etc/resultsexporter.yaml

Example contents of /opt/opsview/resultsexporter/etc/:

drwxr-x--- 2 root opsview 4096 Jan 21 11:53 .
drwxr-x--- 7 root opsview 4096 Jan 21 11:31 ..
-rw-r----- 1 root opsview  625 Jan 18 16:33 resultsexporter.defaults.yaml
-rw-r----- 1 root opsview 2343 Jan 21 17:04 resultsexporter.yaml                   <----- make your changes here

The following options can be overridden in resultsexporter.yaml:

  • results_queue: The message queue configuration.
  • outputs: The list of outputs to export results to, currently results can be exported via syslog, file and HTTP.
  • registry: The connection configuration for the registry.
  • default_fields: The default message fields to export. See Field Mapping.
  • default_filter: The default filter that is applied to messages. See Filtering.

Ensure that your component configuration contains the correct MessageQueue encoder key, password, and Registry password. These values are set when deploying your Opsview system, as specified in /opt/opsview/deploy/etc/user_secrets.yml.

When overriding settings in resultsexporter.yaml, refer to the structure used in resultsexporter.defaults.yaml. For example, to override the messagequeue/registry settings within resultsexporter.yaml:

resultsexporter:
    ...
    results_queue:
        messagequeue:
            encoder_key: ZW5jb2RlcmR1bW15a2V5MTIzNA==
            host: 127.0.0.1
            port: 35672
            management_port: 45672
            user: opsview
            password: opsview
 
    registry:
        host: 127.0.0.1
        port: 12379
        user: opsview
        password: opsview

Refer to the examples as described on Exporting Results for how to add your own outputs.
Please ensure the passwords used match that within your /opt/opsview/deploy/etc/user_secrets.yml found on your deployment server

Management

Configuration

DPKGs

Watchdog service files are now managed by the package, doing a remove would leave the watchdog service file behind with a .save extension. Purging the package will remove it. The package managed config files are as follows:

/opt/opsview/watchdog/etc/services/opsview-resultsexporter.conf

RPMs

Watchdog service files are now managed by the package. Any modifications will be saved at upgrade and remove processes with the .rpmnew and .rpmsave extensions correspondingly.

/opt/opsview/watchdog/etc/services/opsview-resultsexporter.conf

Service Administration

As root, start, stop and restart the service using:

/opt/opsview/watchdog/bin/opsview-monit <stop|start|restart> opsview-resultsexporter

Troubleshooting

Credentials

If you receive this error message, with the /var/log/opsview/opsview. please check the /opt/opsview/resultsexporter/etc/resultsexporter.yaml contains the correct password for the registry.
The opsview-resultsexporter will need to be restarted if any change is made.

Jun 12 10:44:22 opsview-6x-orch opsview.resultsexporter.resultsexporterworker : [ERR] RegistryError<status_code=401, error_code=110, index=0, message=u'The request requires user authentication', raw_message='{"errorCode":110,"message":"The request requires user authentication","cause":"Insufficient credentials","index":0}\n'>

Configuration File Formatting

If you receive this error message, with the /var/log/opsview/opsview. please check the /opt/opsview/resultsexporter/etc/resultsexporter.yaml filter syntax is correct.
For the error below, an extra parenthesis was present.
The opsview-resultsexporter will need to be restarted if any change is made.

Jul 22 12:02:24 orchestrator-main opsview : [ERR] Opsview Results-Exporter launcher failed to start: Output 'syslog.test': Filter Syntax Error - char: ')', line: '1,113'.