I have created 2 notification objects namely
1.generalMAIL-host-notification
2.generalMAIL-service-notification
these are the configurations for each of them
1).apply Notification "generalMAIL-host-notification" to Host {
import "Mail_Host_Notification"
assign where "host_group1" in host.groups
states = [ Down, Up ]
types = [ Custom, Problem, Recovery ]
users = [ "root", "testuser" ]
}
2).
apply Notification "generalMAIL-service-notification" to Service {
import "Mail_Service_Notification"
period = "TimeperiodName"
assign where "service_group1" in service.groups
states = [ Critical, Unknown, Warning ]
types = [ Custom, Problem, Recovery ]
users = [ "root", "testuser" ]
}
I have attached the screen shots of Notifications as well.
On Wed, Feb 8, 2017 at 9:23 PM, Antony Stone <
[email protected]> wrote:
> On Wednesday 08 Feb 2017 at 05:04, ruchira kulathunga wrote:
>
> > How should I show the configuration files?
>
> Well, assuming you don't have 100+ lines relating to notifications, cut &
> paste them into a reply?
>
> If there are multiple similar sections for different purposes, then (both
> for
> the list and for solving the problem yourself) just pick on one of them and
> examine what it's supposed to do and what Icinga actually does.
>
> Did you try the commands I suggested? Did the output tell you anything
> useful
> about what Icinga thinks your config files mean?
>
>
> Antony.
>
> > On Wed, Feb 8, 2017 at 1:21 AM, Antony Stone wrote:
> > > On Tuesday 07 Feb 2017 at 11:10, ruchira kulathunga wrote:
> > > > Hello,
> > > >
> > > > I have upgraded icinga from 2.4.0 to 2.6.1
> > > > Now notifications are not sent.When I send a custom message by force
> it
> > > > will be sent either as a mail or as a SMS as I have configured.But I
> > > > want them to be sent automatically according to the timing.Please
> > > > someone help me to fix this issues.
> > >
> > > We'd need to see your configuration file/s for notifications to guess
> at
> > > what might be happening.
> > >
> > > Have you checked the output of the following commands?
> > >
> > > icinga2 object list --type notification
> > >
> > > icinga2 object list --type user
> > >
> > > icinga2 object list --type timeperiod
> > >
> > > Those should tell you what Icinga is interpreting from your
> configuration
> > > settings.
> > >
> > >
> > > Antony.
>
> --
> Users don't know what they want until they see what they get.
>
> Please reply to the
> list;
> please *don't* CC
> me.
> _______________________________________________
> icinga-users mailing list
> [email protected]
> https://lists.icinga.org/mailman/listinfo/icinga-users
>
--
Best Regards
Ruchira Kulathunga
_______________________________________________
icinga-users mailing list
[email protected]
https://lists.icinga.org/mailman/listinfo/icinga-users