weareinteractive.newrelic

Ansible weareinteractive.newrelic Role

Build Status Galaxy GitHub Tags GitHub Stars

The weareinteractive.newrelic is an Ansible role that:

  • Installs New Relic
  • Configures New Relic
  • Sets up the related service

Important Note:

This role has changed from franklinkim.newrelic to weareinteractive.newrelic because Ansible Galaxy now allows organizations!

Installation

To install using ansible-galaxy:

$ ansible-galaxy install weareinteractive.newrelic

To install using requirements.yml:

- src: weareinteractive.newrelic

To install using git:

$ git clone https://github.com/weareinteractive/ansible-newrelic.git weareinteractive.newrelic

Dependencies

  • Requires Ansible version 2.4 or higher.

Variables

Here's a list of default variables for this role, found in defaults/main.yml.

---
#
# newrelic_license_key: yourkey

# User name
newrelic_user: newrelic
# User group
newrelic_group: newrelic
# Additional groups for the user
newrelic_groups: []
# File for the server monitor's log messages.
newrelic_logfile: /var/log/newrelic/nrsysmond.log
# Log detail level
newrelic_loglevel: info
# Disable NFS client stat gathering
newrelic_disable_nfs: yes
# Disable Docker container stat gathering
newrelic_disable_docker: yes
# Start on boot
newrelic_service_enabled: yes
# Current service state: started or stopped
newrelic_service_state: started
# Override the default hostname if needed
newrelic_override_hostname:
# Label pairs for New Relic
newrelic_labels:
# Proxy server settings (e.g., proxy-host:8080)
newrelic_proxy:
# Option to fix Docker memory issues
newrelic_cgroup_style:

Handlers

These are the actions defined in handlers/main.yml.

---

- name: restart newrelic
  service:
    name: newrelic-sysmond
    state: restarted
  when: newrelic_service_state != 'stopped'

Usage

Here's an example playbook:

---

- hosts: all
  become: yes
  roles:
    - weareinteractive.newrelic
  vars:
    newrelic_license_key: ab2fa361cd4d0d373833cad619d7bcc424d27c16
    # Don't start the service in a Docker environment
    newrelic_service_state: stopped
    newrelic_service_enabled: false

Testing

To test the role:

$ git clone https://github.com/weareinteractive/ansible-newrelic.git
$ cd ansible-newrelic
$ make test

Contributing

To contribute, follow these steps:

  1. Fork the project
  2. Create a feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to your branch (git push origin my-new-feature)
  5. Create a new Pull Request

Note: To update the README.md file, install and run ansible-role:

$ gem install ansible-role
$ ansible-role docgen

License

Copyright (c) We Are Interactive, licensed under the MIT license.

Informazioni sul progetto

Installs and configure newrelic

Installa
ansible-galaxy install weareinteractive.newrelic
Licenza
mit
Download
114.4k
Proprietario