Comments (11)
Do you have allowed_hosts
set in nrpe's config (try /etc/nagios/nrpe_local.cfg
or /usr/local/nagios/etc/nrpe.cfg
on the server you're trying to monitor (192.168.43.110)?
https://cyruslab.net/2012/10/24/adding-allowed-list-to-nrpe-cfg/
You'll need to reload the nrpe service after changes to the conf file.
from docker-nagios.
Yes, I have allowed_hosts
set and I have restarted the nrpe service using brew after making the changes
brew restart nrpe
.
Also, I must again mention that I'm able to view my hosts' details (both localhost and this host) through the Nagios core web interface. Similarly, localhost
also doesn't work which seems pretty strange since all its settings came along with the container.
What might be wrong?
from docker-nagios.
Can you try running the Nagios docker container with host networking? docker run ... --net host ...
from docker-nagios.
On the client running the nrpe server (192.168.43.110) could you run netstat -l -v | grep 5666
$ netstat -l -n | grep 5666
tcp 0 0 0.0.0.0:5666 0.0.0.0:* LISTEN
Is the host 192.168.43.110 the system that's running the docker container? How is the nrpe daemon running? did you install from a package manager or compile from source?
Do you have a firewall configured? can you paste the output of iptables -L
?
I don't expect that a check_nrpe -H localhost will work from within the container, as the nrpe daemon isn't running within the container unless you've set it to do so.
from docker-nagios.
Its working now. Thanks. But the postfix mail service inside the container is unable to send any emails. Please let me know if I'm missing something.
from docker-nagios.
Glad you have this running see issue #28 for the mail - I'll be looking in to this hopefully this week as part of the upgrade to some other parts (nagios plugins)
from docker-nagios.
from docker-nagios.
@JasonRivers I'm reopening the issue because I'm still facing this if I run it from within the container.
Can you elaborate more on this statement of yours, "I don't expect that a check_nrpe -H localhost will work from within the container, as the nrpe daemon isn't running within the container unless you've set it to do so." ? What needs to be done?
Thanks
from docker-nagios.
NRPE is designed to execute check_ commands on a REMOTE server, as a result NRPE has 2 parts to it, the client (check_nrpe) and the server (nrpe).
nrpe (server) listens on port 5666 by default when it's run, and the client talks to this to run commands remotely.
The Docker container does not itself run the nrpe server (nagios has access to any checks directly, you don't need to run a remote execution to the local machine that is running nagios). The container only has the client check_nrpe, you would have to run nrpe on the remote system and set -H $HOSTNAME to be the host of the remote server (not localhost).
In order to run the NRPE server within the docker container (not recommended) you will need to build it with the following:
cd /tmp/nrpe
make nrpe
This will put a binary in /tmp/nrpe/src/nrpe - you will need to run this and give it a config file (see /tmp/nrpe/sample-config/nrpe.cfg) to run this - This way your "localhost" will work. However As the nagios system already has access to all the check commands on the local system this isn't needed at all, the nrpe server should be run on the remote systems that you wish to monitor.
from docker-nagios.
@JasonRivers Thanks Jason for the awesome explanation. I was able to make it work. Now, when I'm trying to run a check on a remote host using the NRPE plugin, I run in this error NRPE: Unable to read output
.I googled it and I found that the nagios
user might not have a permission to execute the script.
Another point which I must also mention is that the checks work just fine when executed on the remote Host. So the problem boils down to the fact that the user which is trying to run the check using the NRPE plugin does not have proper privileges. Any idea on how I can resolve it in context to this docker container?
P.S> - I'm trying to run something like ./check_nrpe -H 10.208.151.23 -c check_users -w 5 -c 10
Thanks
from docker-nagios.
Although, the version check with NRPE plugin is working fine
./check_nrpe -H 10.208.151.23
and it returns NRPE v2.15.
from docker-nagios.
Related Issues (20)
- Include rsync HOT 4
- Update to Nagios Core 4.4.7 HOT 3
- ssh connection? gns3 HOT 2
- Error: Failed to create IO broker set: Cannot allocate memory HOT 6
- Nagios script request : check_apc.pl HOT 1
- Apache2 and NSCA not removing PID on reboot HOT 4
- Unable to get process status HOT 5
- Segmentation fault (core dumped) running nagios HOT 8
- NRPE plugin not installed in the container? HOT 2
- ENVs are not populated using notify_by_xmpp
- Nagios service does not start HOT 1
- HTTPS Options? HOT 2
- wrong data from remote server
- No map shown when using Umlaut in alias HOT 2
- postfix username and password for AWS SES HOT 1
- Not using nsca fills up the docker log file
- Web UI doesnt showup any config data
- Ruby missing from the Dockerfile
- permiussion denied
- Not work the config SMTP to send email
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docker-nagios.