check_nagios_mailq not working

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
pavan509
Posts: 72
Joined: Fri Apr 30, 2021 7:07 am

check_nagios_mailq not working

Post by pavan509 »

Hello Team,

I am getting the below error in Nagiosxi portal for the service emailq which is using the plugin "check_nagios_mailq.py".

==========================================================================================================
(No output on stdout) stderr: Traceback (most recent call last):
File "/usr/local/nagios/libexec/check_nagios_mailq.py", line 46, in
main()
File "/usr/local/nagios/libexec/check_nagios_mailq.py", line 34, in main
outb = int (outb)
ValueError: invalid literal for int() with base 10: 'Program mode requires special privileges, e.g., root or TrustedUser.'
==========================================================================================================

I have followed the https://support.nagios.com/forum/viewto ... lq#p272409 link to verify my issue but couldn't resolve it. Below are the output details based on the information provided in the link.
==========================================================================================================
ls -l /usr/bin/mailq
lrwxrwxrwx 1 root root 27 Aug 20 03:14 /usr/bin/mailq -> /etc/alternatives/mta-mailq

ls -l /etc/alternatives/mta-mailq
lrwxrwxrwx 1 root root 23 Aug 20 03:14 /etc/alternatives/mta-mailq -> /usr/bin/mailq.sendmail

ls -l /usr/bin/mailq.sendmail
lrwxrwxrwx 1 root root 25 Aug 20 03:13 /usr/bin/mailq.sendmail -> ../sbin/sendmail.sendmail
==========================================================================================================

Nagios server is running on RHEL 7.9 in AWS with postfix service running
==========================================================================================================
service postfix status
Redirecting to /bin/systemctl status postfix.service
● postfix.service - Postfix Mail Transport Agent
Loaded: loaded (/usr/lib/systemd/system/postfix.service; disabled; vendor preset: disabled)
Active: active (running) since Tue 2021-08-24 05:48:03 PDT; 28min ago
Process: 16839 ExecStop=/usr/sbin/postfix stop (code=exited, status=0/SUCCESS)
==========================================================================================================

Can someone help me in resolving this issue?
Thanks, Pavan
dchurch
Posts: 858
Joined: Wed Oct 07, 2020 12:46 pm
Location: Yo mama

Re: check_nagios_mailq not working

Post by dchurch »

I can't find a copy of check_nagios_mailq.py as installed by default in Nagios XI. Is this a custom script? What version of Nagios XI are you running?

Have you tried using /usr/local/nagios/libexec/check_mailq? This plugin ships with Nagios XI and is likely better-supported.
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.
pavan509
Posts: 72
Joined: Fri Apr 30, 2021 7:07 am

Re: check_nagios_mailq not working

Post by pavan509 »

Hello @dchurch,

Sorry for the delayed response. The issue had been fixed by myself after modifying the script further.

Kindly close/lock this post
Thanks, Pavan
User avatar
pbroste
Posts: 1288
Joined: Tue Jun 01, 2021 1:27 pm

Re: check_nagios_mailq not working

Post by pbroste »

Thanks, Pavan will close
Locked