Search found 8 matches

by mmccaugh
Thu Jul 11, 2019 10:07 am
Forum: Open Source Nagios Projects
Topic: Assistance with Nagios Logging
Replies: 12
Views: 3854

Re: Assistance with Nagios Logging

Oh yeah this is sorted, I will add more to this as I complete work and deploy just for others in the future that may find this thread trying to do the same thing! But my issue is resolved, future updates are solely to document the solution in more detail for others :)

Cheers!
by mmccaugh
Mon Jul 08, 2019 5:35 pm
Forum: Open Source Nagios Projects
Topic: Assistance with Nagios Logging
Replies: 12
Views: 3854

Re: Assistance with Nagios Logging

[root@nagiosdev nagios]# cat nagioscustom2.log Mon Jul 8 18:16:18 EDT 2019 nagiosdev nagios: SERVICE ALERT: DEV-X6565-lin~PING~CRITICAL~HARD~3~CRITICAL - Host Unreachable (10.6.20.97) Mon Jul 8 18:31:22 EDT 2019 nagiosdev nagios: SERVICE ALERT: DEV-X6565-lin~PING~OK~HARD~3~PING OK - Packet loss = 0%...
by mmccaugh
Mon Jul 08, 2019 5:32 pm
Forum: Open Source Nagios Projects
Topic: Assistance with Nagios Logging
Replies: 12
Views: 3854

Re: Assistance with Nagios Logging

define command { command_name notify-service-by-logfile command_line /usr/bin/printf "%b" "$LONGDATETIME$ nagiosdev nagios: SERVICE ALERT: $HOSTNAME$~$SERVICEDESC$~$SERVICESTATE$~$SERVICESTATETYPE$~$SERVICEATTEMPT$~$SERVICEOUTPUT$\n" >>/var/log/nagios/nagioscustom2.log } Biggest ...
by mmccaugh
Fri Jun 28, 2019 11:03 am
Forum: Open Source Nagios Projects
Topic: Assistance with Nagios Logging
Replies: 12
Views: 3854

Re: Assistance with Nagios Logging

I'm going to play with this (Probably next week at this point) but I'll post what I end up with! Biggest issue is that I do not have a dev nagios box built currently, so I have to generate alerts to test currently. I will probably spin up a test box for this so I can play without limits. Thanks for ...
by mmccaugh
Wed Jun 26, 2019 5:11 pm
Forum: Open Source Nagios Projects
Topic: Re-Enable Checks or Alerting Automatically
Replies: 2
Views: 1685

Re-Enable Checks or Alerting Automatically

OK if this has been asked before I apologize, I have to believe it has been but I cannot seem to find it. But is there a way to automate a period after which host checks, or notifications will automatically be re-enabled? The issue I am trying to solve is notifications get silenced due to work, or a...
by mmccaugh
Wed Jun 26, 2019 5:06 pm
Forum: Open Source Nagios Projects
Topic: Assistance with Nagios Logging
Replies: 12
Views: 3854

Re: Assistance with Nagios Logging

OK the more reading I do the more I am thinking that what I want to do might not actually be possible with how I want to do it. But I do have an idea I think might work. I will need to do a lot more reading, but basically looking at contacts.cfg where we define the notification actions (Currently no...
by mmccaugh
Wed Jun 26, 2019 11:41 am
Forum: Open Source Nagios Projects
Topic: Assistance with Nagios Logging
Replies: 12
Views: 3854

Re: Assistance with Nagios Logging

I think this will actually break what I am doing though, note I DO want these to go to the logfile if notifications are enabled, I just want them to stop if i disable notifications for a service or host.. This change looks like it would actually disable them globally.
by mmccaugh
Mon Jun 24, 2019 3:23 pm
Forum: Open Source Nagios Projects
Topic: Assistance with Nagios Logging
Replies: 12
Views: 3854

Assistance with Nagios Logging

I apologize if this has been asked, I have been doing some reading but cannot seem to find an answer. When service, or host notifications are disabled should notifications still be writing to nagios.log? And if so is there a way to prevent it? I am using nagios.log for some of my alerting, as the al...