Fetchmail

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
vornado
Posts: 85
Joined: Wed Jun 13, 2018 9:17 am

Fetchmail

Post by vornado »

CentOS Linux release 7.9.2009 (Core)

Linux c210enag01.vornadort.com 3.10.0-1160.49.1.el7.x86_64 #1 SMP Tue Nov 30 15:51:32 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

Nagios verion 5.8.7

===

Good morning.

Our passive checks have not been updating, possibly since we updated to 5.8.7. With 'systemctl status nagios', I'm seeing this error:

Error: Got check result for service 'Cron <nagios@c210enag01> /bin/fetchmail -s' on host 'localhost'. Unable to find service

On this server, fetchmail is in /usr/bin, not /bin. I edited the crontab:

crontab -u nagios -e; add /usr/ to get:

*/5 * * * * /usr/bin/fetchmail -s

now I get the error with the new location:

Error: Got check result for service 'Cron <nagios@c210enag01> /usr/bin/fetchmail -s' on host 'localhost'. Unable to find service

How do I fix this? Any assistance would truly be appreciated.

ADDITIONAL INFO

When I run fetchmail manually, I get this:

fetchmail: Connection errors for this poll:
name 0: connection to localhost:imap [::1/143] failed: Connection refused.
name 1: connection to localhost:imap [127.0.0.1/143] failed: Connection refused.
IMAP connection to localhost failed: Connection refused
fetchmail: Connection errors for this poll:
name 0: connection to localhost:pop3 [::1/110] failed: Connection refused.
name 1: connection to localhost:pop3 [127.0.0.1/110] failed: Connection refused.
POP3 connection to localhost failed: Connection refused
fetchmail: Query status=2 (SOCKET)

Thanks and best regards, Steve
dchurch
Posts: 858
Joined: Wed Oct 07, 2020 12:46 pm
Location: Yo mama

Re: Fetchmail

Post by dchurch »

The 'fetchmail' package isn't installed or used in Nagios XI.

Fetchmail is for downloading mail from remote IMAP and POP3 servers and storing it in a local mailbox. I'm not sure what function that would even have on a Nagios XI monitoring machine; Nagios XI sends emails, but fetchmail doesn't do that.

That crontab entry must have been added manually after the installation of Nagios XI. By default running crontab -u nagios -l after a default install shows no crontab for nagios.

I'd inquire who made that crontab entry and why, but in the mean time you can comment it out or remove it from the file:

1. Run "crontab -u nagios -e"
2. Find the line "*/5 * * * * /usr/bin/fetchmail -s" and replace it with

Code: Select all

#*/5 * * * * /usr/bin/fetchmail -s
3. Save and exit the file.
If you didn't get an 8% raise over the course of the pandemic, you took a pay cut.

Discussion of wages is protected speech under the National Labor Relations Act, and no employer can tell you you can't disclose your pay with your fellow employees.
vornado
Posts: 85
Joined: Wed Jun 13, 2018 9:17 am

Re: Fetchmail

Post by vornado »

Thanks for your quick reply. Fetchmail is used in processing our passive service checks. I'll contact the person who set this up.

Steve
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: Fetchmail

Post by benjaminsmith »

Thanks for your quick reply. Fetchmail is used in processing our passive service checks. I'll contact the person who set this up
Thanks, Steve. Let us know if you'd like us to close this topic out.

--Benjamin
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
vornado
Posts: 85
Joined: Wed Jun 13, 2018 9:17 am

Re: Fetchmail

Post by vornado »

Hi Benjamin -- you may close the topic.
Locked