Results Exporter

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

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

Installation Copied

The Opsview Results Exporter component can be installed on the Orchestrator system.

To install the Results Exporter:

# 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 Copied

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.

With resultsexporter.yaml permissions, ensure /opt/opsview/resultsexporter/etc/resultsexporter.yaml is accessible by the opsview group with read permissions. For example:

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:

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.

Note

Please ensure the passwords used match that within your /opt/opsview/deploy/etc/user_secrets.yml found on your deployment server.

Monitoring Copied

(6.7.3 and above)

To apply the self monitoring Host Template for this component, run the following:

host1:~# cd /opt/opsview/deploy/
# configure monitoring of the Opsview Results Exporter component
host1:/opt/opsview/deploy# ./bin/opsview-deploy lib/playbooks/setup-monitoring.yml

Management Copied

Configuration Copied

DPKGs Copied

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 Copied

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 Copied

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

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

Troubleshooting Copied

Credentials Copied

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 Copied

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'.
["Opsview"] ["User Guide"]

Was this topic helpful?