The Opsview Results Exporter component allows exporting of messages to external services. It reads and filters messages from the results exchange queue and allows writing to other services via syslog, file and HTTP.
This component requires access to the Opsview Message Queue. Please make sure
opsview-registry are installed, configured and running before attempting to install and configure
When logging data to Rsyslog via TCP only the first message has the correct priority set, subsequent messages default to the
# 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
# 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
The opsview-results-exporter component ships with a default configuration, which can be modified or overridden as required.
All within the
- default settings - resultsexporter.defaults.yaml
- example settings - resultsexporter.yaml.example
- user settings - resultsexporter.yaml
The default settings file contains default configuration options, but changes should not be made here since the file will be overwritten on package updates. Changes should be made in the user settings file (you can create this file if it does not already exist). Ensure the user settings file has group opsview with read permissions to allow the component to read your configuration e.g: within
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 -rw-r----- 1 root opsview 818 Jan 18 16:33 resultsexporter.yaml.example
The following options can be overridden:
- 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 will be the values set when deploying your Opsview system, as specified in
/opt/opsview/deploy/etc/user_secrets.yml. When overriding options, refer to the structure used in
resultsexporter.defaults.yaml. For example, to override the messagequeue/registry settings within
resultsexporter: ... results_queue: messagequeue: encoder_key: cvHkmqUIyiu/dt/nj9jZjQ== 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 example settings file
resultsexporter.yaml.example for an example on how to add your own outputs.
For detailed information on
resultsexporter.yaml configuration outputs and options, click here.
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:
Watchdog service files are now managed by the package. Any modifications will be saved at upgrade and remove processes with the
.rpmsave extensions correspondingly.
As root, start, stop and restart the service using:
/opt/opsview/watchdog/bin/opsview-monit <stop|start|restart> opsview-resultsexporter