How to use gmail/external mail id to send notification

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
vimalparikh
Posts: 10
Joined: Fri Jan 13, 2017 10:50 am

Re: How to use gmail/external mail id to send notification

Post by vimalparikh »

Hi tgriep,

Please findn the attached error snap shot...

Both command shows command not found message.

by the way i am using CentOS 7
Attachments
cpan.jpg
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: How to use gmail/external mail id to send notification

Post by mcapra »

The suspected root issue (as of this moment) is that your Perl environment doesn't have the correct versions of the Net::SSLeay and IO::Socket::SSL modules. As there exist many versions of these modules, there's no telling which version a particular package provider offers. Yum might offer 0.1, APT might offer 0.2, CPAN might offer 0.3a, zypper might offer 0.2b, you get the idea.

You could also download, build, and install those modules totally from the source code. Or change them and create your own version; Call it Net::SSLeayButBetter or whatever and load it into your Perl environment. Or, as previously mentioned, have a package manager take care of all of that auto-magically and be at the mercy of whatever version the package manager distributes. The same goes for Python, Node, R, most modern software ecosystems that have package managers. Just because a package manager offers some piece of software doesn't necessarily mean it's the latest version of that software.

CPAN is the Comprehensive Perl Archive Network. It's like yum/apt/pip/npm, but specifically for Perl modules.

If the command is not found, I would suggest installing the cpan package first:

Code: Select all

yum install cpan
Then, once CPAN is appropriately set up, run the commands again:

Code: Select all

cpan -i Net::SSLeay
cpan -i IO::Socket::SSL
As a general Linux tip, if a command is not found, try installing it as a package.
Former Nagios employee
https://www.mcapra.com/
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: How to use gmail/external mail id to send notification

Post by tgriep »

Thanks @mcapra for the help.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked