stackhpc.monasca-rsyslog
Monasca Rsyslog Connector
This role connects a local rsyslog installation to the Monasca log API.
Requirements
You need to ensure that the Monasca log APIs can be accessed from your host. You must provide client credentials for Monasca logging as parameters in your playbook, which will be saved in a clouds.yaml
file.
Role Variables
monasca_rsyslog_venv: This is the path to the virtual environment for the Monasca rsyslog connector. The default is
/usr/libexec/monasca-rsyslog
.monasca_rsyslog_api_endpoint: This is the Monasca log API endpoint and should look like
http://monasca-log-api:5607/v3.0
.monasca_rsyslog_api_auth: These are your OpenStack authentication details, which should be in a dictionary format like this:
auth_url
: This is the OpenStack Keystone endpoint, for example,http://keystone:5000/
.project
: The OpenStack tenant/project name.username
: Your OpenStack username.password
: Your OpenStack password.
You can also include these optional variables:
project_domain_name
: The OpenStack project domain name (default is "Default").region_name
: The OpenStack region name (default is "RegionOne").user_domain_name
: The OpenStack user domain name (default is "Default").service_type
: The OpenStack monitoring service type (default is "monitoring").endpoint_type
: The OpenStack monitoring endpoint type (default is "public").
monasca_rsyslog_packages_install: A flag to indicate if package dependencies for creating a Python virtual environment should be installed on the host OS. Default is
True
.monasca_rsyslog_rhel_packages: A list of package names needed for enabling virtual environment support on EPEL-enabled CentOS.
monasca_rsyslog_debian_packages: A list of package names needed for enabling virtual environment support in a Debian distribution.
monasca_rsyslog_custom_template_folder: This is a relative folder to the playbook running this role, which contains custom rsyslog templates (for example, if you need to handle system logs not managed by rsyslog).
Dependencies
This role installs the monasca-rsyslog
output driver created by Steve Simpson, which can be found at GitHub.
Example Playbook
Here is an example playbook that connects an rsyslog deployment with a Monasca output plugin:
---
- name: Deploy driver for Monasca-rsyslog
hosts: all
roles:
- role: stackhpc.monasca-rsyslog
monasca_rsyslog_api_auth:
auth_url: "http://openstack-keystone:5000"
project: "monasca"
username: "monasca-agent"
password: "{{ vault_encrypted_monasca_agent_password }}"
monasca_rsyslog_venv: "/usr/libexec/monasca-rsyslog"
Author Information
- Stig Telfer (stig@stackhpc.com)
Role to connect a local rsyslog service with Monasca's log API.
ansible-galaxy install stackhpc.monasca-rsyslog