In order to truly automate the installation of NRPE agents, one should not be expected to manual run a compile from a tarball on every endpoint.
Furthermore the expectation that if paying users of Nagios XI must depend on the communities behind Ubuntu or CentOS to get current binary packages is an insult to every customer.
What plans does Nagios XI have to support dev/ops deployment such as Puppet or Ansible?
Automated installation of NRPE
-
- Former Nagios Staff
- Posts: 4583
- Joined: Wed Sep 21, 2016 10:29 am
- Location: NoLo, Minneapolis, MN
- Contact:
Re: Automated installation of NRPE
Puppet can already be used with Nagios: https://support.nagios.com/kb/article.php?id=454
You do not need to compile anything for NRPE. Installation instructions are as follows:
You asked about repos in the other thread, which is why you were given a Debian repo.
You do not need to compile anything for NRPE. Installation instructions are as follows:
Code: Select all
cd /tmp
wget https://assets.nagios.com/downloads/nagiosxi/agents/linux-nrpe-agent.tar.gz
tar xzf linux-nrpe-agent.tar.gz
cd linux-nrpe-agent
./fullinstall
-
- Posts: 5
- Joined: Mon Mar 05, 2018 3:48 pm
Re: Automated installation of NRPE
I've created my own playbook while migrating to XI...its pretty basic, but it does the job. It assumes all files and configs are sitting in your files directory and you've created two handlers (in my case disabling the Core client and enabling the XI client). Remove the mount point additions and move the notify to another task:
Code: Select all
---
- name: Copy the agent
copy: src=files/linux-nrpe-agent.tar.gz dest=/tmp
tags:
- install
- name: Extract the installer
unarchive: src=/tmp/linux-nrpe-agent.tar.gz dest=/tmp
tags:
- install
- name: Install NRPE Agent
shell: "cd /tmp/linux-nrpe-agent;./fullinstall -n"
tags:
- install
ignore_errors: yes
- name: Copy the NRPE config
copy: src=files/nrpe dest=/etc/xinetd.d/nrpe
tags:
- config
- name: Copy the mount point check scripts
copy: src=files/{{ item }} dest=/usr/local/nagios/libexec/ mode=0755 owner=ro ot group=root
with_items:
- check_mountpoints
- check_ro_mounts
tags:
- mount
- name: Add mount point check to common.cfg
lineinfile: path=/usr/local/nagios/etc/nrpe/common.cfg line="command[check_mo untpoints]=sudo /usr/local/nagios/libexec/check_mountpoints -A" state=present
tags:
- mount
- name: Copy the read only mount point check script
lineinfile: path=/usr/local/nagios/etc/nrpe/common.cfg line="command[check_ro _mounts]=/usr/local/nagios/plugins/check_ro_mounts -x /mnt/cdrom" state=present
tags:
- mount
notify:
- Stop NRPE
- Start Xinetd
- name: Allow NagiosXI to check services via NRPE
lineinfile: path=/etc/sudoers line="nagios ALL=NOPASSWD{{':'}} /usr/local/nag ios/libexec/check_init_service, /usr/local/nagios/libexec/check_mountpoints" sta te=present
tags:
- sudo
- name: Cleanup of leftovers
file: dest=/tmp/linux-nrpe-agent state=absent
tags:
- cleanup
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Automated installation of NRPE
Thanks for sharing @ipcsysadmins
Re: Automated installation of NRPE
Hey,
I found interesting things here:
https://support.nagios.com/forum/viewto ... 16&t=43062
There couple basic things that help me.May help you as well.
Note me if not,thanks.Cheer!
I found interesting things here:
https://support.nagios.com/forum/viewto ... 16&t=43062
There couple basic things that help me.May help you as well.
Note me if not,thanks.Cheer!
My Crypto Project start at 2019!
Re: Automated installation of NRPE
@wb720, do you have any more questions or it is safe to lock this post?
Be sure to check out our Knowledgebase for helpful articles and solutions!