check_unread_mails Plugin in NagiosXI

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
imadc
Posts: 58
Joined: Wed Jun 14, 2017 12:10 pm

check_unread_mails Plugin in NagiosXI

Post by imadc »

Hello Team

I am trying to use this plugin: https://exchange.nagios.org/directory/P ... ls/details

I am getting the following error, do you if any prerequisites needed for this plugin? do we need perl?

[root@prodnagios libexec]# ./check_unread_mails.pl
-bash: ./check_unread_mails.pl: /usr/bin/perl^M: bad interpreter: No such file or directory

Thanks
Insurity
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: check_unread_mails Plugin in NagiosXI

Post by scottwilkerson »

this looks like you have windows line ending in the file

Lets install a line ending converter

Code: Select all

yum install dos2unix -y
Then run the following

Code: Select all

dos2unix /usr/local/nagios/libexec/check_unread_mails.pl
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked