Nagios reporter & notifications

Hi, I’m new to the forum and its helped me out quite a bit (thank you to whomever set it all up)

I have two questions:

  1. For notifications, all I want is to have Nagios send a alert notification to my e-mail address once when host/service goes down, and once when it goes up.

I have commented out the “notification interval” directive from the Nagios configuration templates. Yet I still get notifications sent out every 30 minutes. Also, I notice the “register” directive in the templates is set to 0, should I set that to 1?

  1. I’m running the nagios-reporter perl script and I have looked at this thread and have come to the conclusion that since I have all the modules correctly installed, since when I execute the command ‘perl -c nagos_reporter.pl’ script its giving me the following output: nagios_report.pl syntax OK, and that I’m getting the error: **Can’t call method “mail” on an undefined value at ./nagios_report.pl **, therefore it has to be the information related to my SMTP configuration.

When Nagios sends alerts to my google account, I have the following in the received from header: [email protected]

So, I have filled the following fields out in the nagios_reporter.pl script:

my $mailhost = ** ‘server.example.com’; ** # Fill these in!

Our domain
my $maildomain = ** ‘example.com’; ** # Fill these in!

The address from which our nagios alert emails are sent
my $mailfrom = ** ‘[email protected]’; ** # Fill these in!

My email address
my $mailto = ** ‘[email protected]’; **

And it doesn’t work, still shows that error.

Can anyone give me any pointers on what I should do next?

Thanks so much in advance!!!

If there is any additional information I should post, please tell me!

Forget it, I fixed both problems. Thanks anyways!

how you fix both the problem. Please post on forum…