Hello!

I was submit tweet-host-notification on previous email. Is there any miss
config?

On Wednesday, September 2, 2015, Michael Friedrich <
michael.friedr...@netways.de> wrote:

> Hi,
>
> Sent from my iphone w/ free typos.
>
> > Am 02.09.2015 um 09:11 schrieb Dewangga Bachrul Alam <
> dewangg...@xtremenitro.org <javascript:;>>:
> >
> > Hello!
> >
> > I've install and configure tweepy library to tweet action for host
> > and/or service, everything should be OK, but I got problem with
> > `conf.d/notifications.conf`.
> >
> > My Notification are looks like :
> >
> > .. [truncated] ..
> >
> > apply Notification "tweet-icingaadmin" to Host {
> >  import "tweet-host-notification"
> >  assign where host.vars.notification.tweet == "True"
> > }
> >
> > .. [truncated] ..
>
> tweet-host-notification template looks like?
>
> Kind regards,
> Michael
>
> >
> > In conf.d/hosts.conf, I just add this line :
> >
> > .. [truncated] ..
> > object Host "my-hosts" {
> >
> >        vars.notification.tweet = "True"
> > .. [truncated] ..
> >
> > The script for notifications `scripts/tweet-host-notification.sh`
> >
> > #!/bin/sh
> > python=$(which python)
> > template=`cat <<TEMPLATE
> > $HOSTSTATE [ $HOSTALIAS ] $HOSTOUTPUT
> > TEMPLATE
> > `
> > $python /etc/icinga2/scripts/tweet-notification.py "$template"
> >
> > And the last, the conf.d/commands.conf
> > .. [truncated] ..
> > object NotificationCommand "tweet-host-notification" {
> >  import "plugin-notification-command"
> >
> >  command = [ SysconfDir + "/icinga2/scripts/tweet-host-notification.sh" ]
> >
> >  env = {
> >    HOSTALIAS = "$host.display_name$"
> >    HOSTSTATE = "$host.state$"
> >    HOSTOUTPUT = "$host.output$"
> >  }
> > }
> > .. [truncated] ..
> >
> > All python & bash script verified running using icinga users.
> > Then, I tried to reload the icinga2 daemon, it came with errors.
> >
> > Logs: http://fpaste.org/262355/41177709/raw/
> > My question, where the tweet-icingaadmin refers to? It was same with
> > mail-icingaadmin, I can't find that vars refers to.
> >
> > Any feedback/help are appreciated.
> > Many thanks.
> > _______________________________________________
> > icinga-users mailing list
> > icinga-users@lists.icinga.org <javascript:;>
> > https://lists.icinga.org/mailman/listinfo/icinga-users
>
> --
> Michael Friedrich, DI (FH)
> Senior Developer
>
> NETWAYS GmbH | Deutschherrnstr. 15-19 | D-90429 Nuernberg
> Tel: +49 911 92885-0 | Fax: +49 911 92885-77
> GF: Julian Hein, Bernd Erk | AG Nuernberg HRB18461
> http://www.netways.de | michael.friedr...@netways.de <javascript:;>
>
> ** OSBConf 2015 - September - osbconf.org **
> ** OSMC 2015 - November - netways.de/osmc **
> _______________________________________________
> icinga-users mailing list
> icinga-users@lists.icinga.org <javascript:;>
> https://lists.icinga.org/mailman/listinfo/icinga-users
>


-- 
Sent from iDewangga Device
_______________________________________________
icinga-users mailing list
icinga-users@lists.icinga.org
https://lists.icinga.org/mailman/listinfo/icinga-users

Reply via email to