Postfix for nagios email notification alerts problem
-
- Posts: 70
- Joined: Mon Aug 07, 2017 4:19 am
Re: Postfix for nagios email notification alerts problem
Hi @tgriep,
I followed that link.
I got another link http://xmodulo.com/monitor-server-memor ... cutor.html and http://www.the-tech-tutorial.com/nagios ... d-install/ . I tried to download the plugins and add them. But still not able to resolve the issue.
I getting these errors,
NRPE: Command 'check_mnt' not defined
NRPE: Command 'check_mem' not defined
NRPE: Command 'check_disk' not defined
CHECK_NRPE: Error - Could not complete SSL handshake.
These error means I should download them to /usr/local/nagios/libexec and define them in commands.cfg and also add them in host.cfg and also on client-nrpe.cfg .
I want help in this entire procedure. Plus, if I have multiple mounted drives, how to monitor them.
I downloaded few plugins from https://exchange.nagios.org and checked. But the issue still persists.
I have attached my libexec folder and commands.cfg file . I had to remove HariSekhon and nagios-plugin downloaded from the link given in above posts from this folder because was not able to upload as it exceeded max size for upload. If we can use any other plugins for monitoring Memory, DiskSpace, Mounted DiskSpace and Load?
I followed that link.
I got another link http://xmodulo.com/monitor-server-memor ... cutor.html and http://www.the-tech-tutorial.com/nagios ... d-install/ . I tried to download the plugins and add them. But still not able to resolve the issue.
I getting these errors,
NRPE: Command 'check_mnt' not defined
NRPE: Command 'check_mem' not defined
NRPE: Command 'check_disk' not defined
CHECK_NRPE: Error - Could not complete SSL handshake.
These error means I should download them to /usr/local/nagios/libexec and define them in commands.cfg and also add them in host.cfg and also on client-nrpe.cfg .
I want help in this entire procedure. Plus, if I have multiple mounted drives, how to monitor them.
I downloaded few plugins from https://exchange.nagios.org and checked. But the issue still persists.
I have attached my libexec folder and commands.cfg file . I had to remove HariSekhon and nagios-plugin downloaded from the link given in above posts from this folder because was not able to upload as it exceeded max size for upload. If we can use any other plugins for monitoring Memory, DiskSpace, Mounted DiskSpace and Load?
- Attachments
-
- libexec 2.zip
- (4.05 MiB) Downloaded 213 times
-
- commands.cfg
- (10.85 KiB) Downloaded 544 times
Re: Postfix for nagios email notification alerts problem
The NRPE errors suggest that the NRPE agent it not configured on the remote host as well as the commands are not created in the NRPE config files.
Take a look at this KB article for instructions for installing the NRPE Agent and the plugins on the remote host.
https://support.nagios.com/kb/article.php?id=515
Take a look at this KB article for instructions for installing the NRPE Agent and the plugins on the remote host.
https://support.nagios.com/kb/article.php?id=515
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
- Posts: 70
- Joined: Mon Aug 07, 2017 4:19 am
Re: Postfix for nagios email notification alerts problem
Hi @tgriep,
Based on the document you shared, I tried to create those commands. But I was not able to resolve the issue. Is it possible to share some generic definitions for checkin CPU load, Memory and Disk so that i can check it and if it's working, i can change it accordingly suitable for me. It would be very helpful.
And also, i noticed that in hostnrpe.cfg, check_load and check_disk is in /usr/lib/nagios/plugins/ path. But in Nagios server, path is /usr/local/nagios/libexec/. Is this any issue?
And also thank you for being patient with me.
Based on the document you shared, I tried to create those commands. But I was not able to resolve the issue. Is it possible to share some generic definitions for checkin CPU load, Memory and Disk so that i can check it and if it's working, i can change it accordingly suitable for me. It would be very helpful.
And also, i noticed that in hostnrpe.cfg, check_load and check_disk is in /usr/lib/nagios/plugins/ path. But in Nagios server, path is /usr/local/nagios/libexec/. Is this any issue?
Code: Select all
command[check_load]=/usr/lib/nagios/plugins/check_load -w 15,10,5 -c 30,25,20
command[check_hda1]=/usr/lib/nagios/plugins/check_disk -w 20% -c 10% -p /dev/sda1
Re: Postfix for nagios email notification alerts problem
The commands that are defined look OK and should work.
I would change the check_disk command to a more generic name like this.
Doesn't have to be done if you don't want to.
The paths being in different places on the Nagios server vs the remote server doesn't matter. As long as they are correct, they should work.
Here are a couple of commands you can run on the Nagios server so we can see what the errors. Run the following as root, change the xxx.xxx.xxx.xxx to the IP address of the remote server and post the output.
If you are still having the SSL error, take a look at this KB article for possible solutions.
https://support.nagios.com/kb/article/n ... e-615.html
I would change the check_disk command to a more generic name like this.
Code: Select all
command[check_disk]=/usr/lib/nagios/plugins/check_disk -w 20% -c 10% -p /dev/sda1
The paths being in different places on the Nagios server vs the remote server doesn't matter. As long as they are correct, they should work.
Here are a couple of commands you can run on the Nagios server so we can see what the errors. Run the following as root, change the xxx.xxx.xxx.xxx to the IP address of the remote server and post the output.
Code: Select all
/usr/local/nagios/libexec/check_nrpe -H xxx.xxx.xxx.xxx
/usr/local/nagios/libexec/check_nrpe -H xxx.xxx.xxx.xxx -c check_load
https://support.nagios.com/kb/article/n ... e-615.html
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
- Posts: 70
- Joined: Mon Aug 07, 2017 4:19 am
Re: Postfix for nagios email notification alerts problem
Hi @tgriep,
This helped me resolving disk and load error
Also for one of the host, I'm getting
This helped me resolving disk and load error
For memory and mounted disk, I'm gettingIf you are still having the SSL error, take a look at this KB article for possible solutions.
https://support.nagios.com/kb/article/n ... e-615.html
Code: Select all
Memory UNKNOWN 01-23-2018 06:41:48 0d 1h 23m 50s 3/3 NRPE: Command 'check_mem' not defined
Mounted Drive Disk Space UNKNOWN 01-23-2018 06:42:25 0d 1h 23m 14s 3/3 NRPE: Command 'check_remote_disk' not defined
Code: Select all
Memory UNKNOWN 01-23-2018 11:01:45 0d 5h 49m 35s 3/3 NRPE: Unable to read output
Re: Postfix for nagios email notification alerts problem
The command not defined it caused by a missing command definition in the remote NRPE agents configuration file. If the command is missing, it will generate that error.
Take a look at this KB article.
https://support.nagios.com/kb/article/n ... d-621.html
There are a few reasons for the Unable to read output message. Take a look at this article for some solutions.
https://support.nagios.com/kb/article/n ... t-620.html
Take a look at this KB article.
https://support.nagios.com/kb/article/n ... d-621.html
There are a few reasons for the Unable to read output message. Take a look at this article for some solutions.
https://support.nagios.com/kb/article/n ... t-620.html
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
- Posts: 70
- Joined: Mon Aug 07, 2017 4:19 am
Re: Postfix for nagios email notification alerts problem
Hi,
I reinstalled nope and Unable to read output issue is resolved.
But check_mounted disk issue remains. I'm not good in writing commands and arguments. I tried to download some functions from nagios exchange but it didn't work, maybe, writing it in commands.cfg and defining it in nrpe.cfg got it wrong.
If you could help in providing link for check_mounted disk and help me define it, it would be very helpful
I reinstalled nope and Unable to read output issue is resolved.
But check_mounted disk issue remains. I'm not good in writing commands and arguments. I tried to download some functions from nagios exchange but it didn't work, maybe, writing it in commands.cfg and defining it in nrpe.cfg got it wrong.
If you could help in providing link for check_mounted disk and help me define it, it would be very helpful
Re: Postfix for nagios email notification alerts problem
I would have to know which plugin you are using to be sure but you can create a command in the nrpe.cfg file like the example below.
Make sure the path to the plugin is correct as well as the name.
Save the file and restart the NRPE Agent.
Then on the Nagios system, this would be the command you would use to connect to the remote server and run the command.
Try that out and post any other questions.
Code: Select all
command[check_remote_disk]=/usr/local/nagios/libexec/check_remote_disk $ARG1$
Save the file and restart the NRPE Agent.
Then on the Nagios system, this would be the command you would use to connect to the remote server and run the command.
Code: Select all
/usr/local/nagios/libexec/check_nrpe -H xxx.xxx.xxx.xxx -c check_remote_disk
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
- Posts: 70
- Joined: Mon Aug 07, 2017 4:19 am
Re: Postfix for nagios email notification alerts problem
Hi tgriep,
Sorry for the late reply, was on leave.
I want to use these plugins if possible
for memory : https://exchange.nagios.org/directory/P ... em/details
for mounted disk : https://exchange.nagios.org/directory/P ... ks/details
Sorry for the late reply, was on leave.
I want to use these plugins if possible
for memory : https://exchange.nagios.org/directory/P ... em/details
for mounted disk : https://exchange.nagios.org/directory/P ... ks/details
- tacolover101
- Posts: 432
- Joined: Mon Apr 10, 2017 11:55 am
Re: Postfix for nagios email notification alerts problem
the instructions @tgriep mentioned should work for this, you'll need to substitute in and figure out the plugins you posted though.Siddharth Hegde wrote:Hi tgriep,
Sorry for the late reply, was on leave.
I want to use these plugins if possible
for memory : https://exchange.nagios.org/directory/P ... em/details
for mounted disk : https://exchange.nagios.org/directory/P ... ks/details
tgriep wrote:I would have to know which plugin you are using to be sure but you can create a command in the nrpe.cfg file like the example below.Make sure the path to the plugin is correct as well as the name.Code: Select all
command[check_remote_disk]=/usr/local/nagios/libexec/check_remote_disk $ARG1$
Save the file and restart the NRPE Agent.
Then on the Nagios system, this would be the command you would use to connect to the remote server and run the command.Try that out and post any other questions.Code: Select all
/usr/local/nagios/libexec/check_nrpe -H xxx.xxx.xxx.xxx -c check_remote_disk