Many Thanks Gerald,

It runs now perfect! I forgot the POST.. and the filter wasnt correct. Hier
the result:

curl -k -s -H 'Accept: application/json' -X POST --cert downtimes_user.crt
--key downtimes_user.key '
https://icinga-01.xxx:5665/v1/actions/remove-downtime?service=bx46.xxx!ssh'
| python -m json.tool
{
    "results": [
        {
            "code": 200.0,
            "status": "Successfully removed all downtimes for object
'bx46.xxx!ssh'."
        }
    ]
}

Regards,
Christian

Christian Moreno Moreno
System Engineer Offers

idealo internet GmbH
Ritterstraße 11
10969 Berlin, Deutschland
Tel.: +49 (0)30 40 30 10 33
Fax: +49 (0)30 221 94 33 - 21
E-Mail: christian.mor...@idealo.de
Geschäftsführer:
Dr. Albrecht von Sonntag, Dr. Philipp-Christopher Peitsch
HRB 76749 – Amtsgericht Berlin-Charlottenburg
[image: idealo Logo] <http://www.idealo.de/>





2017-02-02 5:18 GMT+01:00 <icinga-users-requ...@lists.icinga.org>:

> Send icinga-users mailing list submissions to
>         icinga-users@lists.icinga.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
>         https://lists.icinga.org/mailman/listinfo/icinga-users
> or, via email, send a message with subject or body 'help' to
>         icinga-users-requ...@lists.icinga.org
>
> You can reach the person managing the list at
>         icinga-users-ow...@lists.icinga.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of icinga-users digest..."
>
>
> Today's Topics:
>
>    1. Problem remove downtime of one service via API
>       (Christian Moreno Moreno)
>    2. Re: Problem remove downtime of one service via API (Gerald Vogt)
>    3. Logging to syslog produces little to no output (Horatiu N)
>    4. Re: notifications Problems after upgrade 2.4 -> 2.6
>       (ruchira kulathunga)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Wed, 1 Feb 2017 12:15:12 +0100
> From: Christian Moreno Moreno <christian.mor...@idealo.de>
> To: icinga-users@lists.icinga.org
> Subject: [icinga-users] Problem remove downtime of one service via API
> Message-ID:
>         <CAHCD4S8aABXGFzxS9CuLYU3NQ6SNnuqq_k78urcPC=1To7gnWw@mail.
> gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> Hi!
>
> I tried to delete one downtime (only one of the services and not all
> services from the host) but I get the next error:
>
> curl -k -s -H 'Accept: application/json' --cert downtimes_user.crt --key
> downtimes_user.key '
> https://icinga-01.xxx:5665/v1/actions/remove-downtime?
> downtime=bx46.xxx!ping4'
> | python -m json.tool
> {
>     "error": 404.0,
>     "status": "The requested path 'v1/actions/remove-downtime' could not be
> found or the request method is not valid for this path."
>
>
> I tried to with:
>
> /v1/actions/remove-downtime?type=Service%22&filter=host.name==%22bx46.xxx&
> service.name==%22ping4'
>
> but same result...
>
> Many Thanks,
>
> Christian
>
> Christian Moreno Moreno
> System Engineer Offers
>
> idealo internet GmbH
> Ritterstra?e 11
> 10969 Berlin, Deutschland
> Tel.: +49 (0)30 40 30 10 33
> Fax: +49 (0)30 221 94 33 - 21
> E-Mail: christian.mor...@idealo.de
> Gesch?ftsf?hrer:
> Dr. Albrecht von Sonntag, Dr. Philipp-Christopher Peitsch
> HRB 76749 ? Amtsgericht Berlin-Charlottenburg
> [image: idealo Logo] <http://www.idealo.de/>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <http://lists.icinga.org/pipermail/icinga-users/
> attachments/20170201/672a3280/attachment-0001.html>
>
> ------------------------------
>
> Message: 2
> Date: Wed, 1 Feb 2017 12:25:59 +0100
> From: Gerald Vogt <v...@spamcop.net>
> To: icinga-users@lists.icinga.org
> Subject: Re: [icinga-users] Problem remove downtime of one service via
>         API
> Message-ID: <65ae448e-d150-bae5-c191-a9fdc5285...@spamcop.net>
> Content-Type: text/plain; charset=utf-8; format=flowed
>
> Check the documentation:
>
> https://docs.icinga.com/icinga2/latest/doc/module/
> icinga2/chapter/icinga2-api#icinga2-api-actions-remove-downtime
>
> A GET won't work. You have to send a POST including the accept header...
>
> -Gerald
>
> On 01/02/2017 12:15, Christian Moreno Moreno wrote:
> > Hi!
> >
> > I tried to delete one downtime (only one of the services and not all
> > services from the host) but I get the next error:
> >
> > curl -k -s -H 'Accept: application/json' --cert downtimes_user.crt --key
> > downtimes_user.key
> > 'https://icinga-01.xxx:5665/v1/actions/remove-downtime?
> downtime=bx46.xxx!ping4'
> > | python -m json.tool
> > {
> >     "error": 404.0,
> >     "status": "The requested path 'v1/actions/remove-downtime' could not
> > be found or the request method is not valid for this path."
> >
> >
> > I tried to with:
> >
> > /v1/actions/remove-downtime?type=Service%22&filter=host.name
> > <http://host.name>==%22bx46.xxx&service.name
> > <http://service.name>==%22ping4'
> >
> > but same result...
> >
> > Many Thanks,
> >
> > Christian
> >
> > Christian Moreno Moreno
> > System Engineer Offers
> >
> > idealo internet GmbH
> > Ritterstra?e 11
> > 10969 Berlin, Deutschland
> > Tel.: +49 (0)30 40 30 10 33
> > Fax: +49 (0)30 221 94 33 <tel:%2B49%20%280%2930%20221%2094%2033> - 21
> > E-Mail: christian.mor...@idealo.de <mailto:christian.mor...@idealo.de>
> > Gesch?ftsf?hrer:
> > Dr. Albrecht von Sonntag, Dr. Philipp-Christopher Peitsch
> > HRB 76749 ? Amtsgericht Berlin-Charlottenburg
> > idealo Logo <http://www.idealo.de/>
> >
> >
> >
> >
> >
> >
> >
> > _______________________________________________
> > icinga-users mailing list
> > icinga-users@lists.icinga.org
> > https://lists.icinga.org/mailman/listinfo/icinga-users
> >
>
>
> ------------------------------
>
> Message: 3
> Date: Thu, 2 Feb 2017 01:31:42 +0200
> From: Horatiu N <hora...@ddhosted.com>
> To: icinga-users@lists.icinga.org
> Subject: [icinga-users] Logging to syslog produces little to no output
> Message-ID: <6a55fbb8-9f21-6a75-1699-8519bb9c7...@ddhosted.com>
> Content-Type: text/plain; charset="utf-8"; Format="flowed"
>
> Heya.
> I have syslog feature enabled and at the same time compatlog enabled.
> I see lots of relevant things in compatlog like external commands,
> service alerts, service and host notifications, etc.
> If I do a tail -f /var/log/messages i get little to no output for hours.
> I see only a few messages startup and shutdown when I manually restart
> the daemon.
> > object SyslogLogger "syslog" {
> >     severity = "warning"
> > }
>
> That's all the syslog 'config' has to say. I want a little more
> verbosity and debug and notice severities contain way too much information.
>
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: smime.p7s
> Type: application/pkcs7-signature
> Size: 3705 bytes
> Desc: S/MIME Cryptographic Signature
> URL: <http://lists.icinga.org/pipermail/icinga-users/
> attachments/20170202/703278d8/attachment-0001.bin>
>
> ------------------------------
>
> Message: 4
> Date: Thu, 2 Feb 2017 09:48:09 +0530
> From: ruchira kulathunga <rsbk....@gmail.com>
> To: "Icinga User's Corner" <icinga-users@lists.icinga.org>
> Subject: Re: [icinga-users] notifications Problems after upgrade 2.4
>         -> 2.6
> Message-ID:
>         <CA+NF6sk5REvHw3cFH5Zn+0PjC5A7LPJ5o-6vz8MpDn7tWRZSeA@
> mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> Hello,
> I want to upgrade icinga2 from 2.4.0 to 2.6.1.Could you please provide me
> the steps to upgrade, since I am new to icinga environment.
>
> best regards,
> Ruchira kulathunga
>
> On Tue, Jan 31, 2017 at 2:05 PM, Christian Moreno Moreno <
> christian.mor...@idealo.de> wrote:
>
> > Hi,
> >
> > We did one upgrade from icinga2.4 to 2.6 (inclusive icingaweb2), but we
> > have Problems with the notifications templates.
> >
> > We have configured in our hosts and services theses variables for the
> > notifications:
> >
> > vars.notification.mail.users = "t...@xxx.de"
> > vars.notificaton.sms.users = "operations_sms"
> >
> > and our notifications.conf was something like:
> >
> > FOR MAIL:
> >
> > apply Notification "mail-icingaadmin" to Host {
> >   import "mail-host-notification"
> >
> >   interval = 0 // re-notification disabled
> >
> >   users = host.vars.notification.mail.users
> >
> >   assign where host.vars.notification.mail
> > }
> >
> > apply Notification "mail-icingaadmin" to Service {
> >   import "mail-service-notification"
> >
> >
> >   users = host.vars.notification.mail.users
> >   if (service.vars.notification.mail.users != "" ) {
> >         users = service.vars.notification.mail.users
> >   }
> >
> >   if (service.vars.interval_notification != "" ) {
> >         interval = service.vars.interval_notification
> >         }else {
> >
> >                 interval = 0 // Standard: re-notification disabled
> >         }
> >
> >
> >   assign where host.vars.notification.mail
> > }
> >
> >
> >
> > FOR SMS:
> >
> > ### SMS Gateway
> >
> > apply Notification "host_gateway-notification" to Host {
> >   import "host_gateway-notification"
> >
> >   interval = 30m // re-notification
> >
> >   users = host.vars.notification.sms.users
> >   assign where host.vars.notification.sms
> > }
> >
> >
> > apply Notification "service_gateway-notification" to Service {
> >   import "service_gateway-notification"
> >
> >
> >   interval = 30m // re-notification
> >
> >   users = host.vars.notification.sms.users
> >   if (service.vars.notification.sms.users != "" ) {
> >         users = service.vars.notification.sms.users
> >         }
> >
> >   assign where host.vars.notification.sms
> > }
> >
> >
> > It was running in production, but after the upgrade, we get a lot of
> > Config Errors because it cant find the User.
> >
> > PS: In some hosts/service, the sms user was empty:
> > vars.notificaton.sms.users = ""
> >
> > Then Icinga didnt do any sms notification for these services/hosts... is
> > possible that in the new version empty values are not permit?
> >
> > Many Thanks,
> >
> > Christian Moreno
> >
> >
> >
> > Christian Moreno Moreno
> > System Engineer Offers
> >
> > idealo internet GmbH
> > Ritterstra?e 11
> > 10969 Berlin, Deutschland
> > Tel.: +49 (0)30 40 30 10 33
> > Fax: +49 (0)30 221 94 33 - 21
> > E-Mail: christian.mor...@idealo.de
> > Gesch?ftsf?hrer:
> > Dr. Albrecht von Sonntag, Dr. Philipp-Christopher Peitsch
> > HRB 76749 ? Amtsgericht Berlin-Charlottenburg
> > [image: idealo Logo] <http://www.idealo.de/>
> >
> >
> >
> >
> >
> > _______________________________________________
> > icinga-users mailing list
> > icinga-users@lists.icinga.org
> > https://lists.icinga.org/mailman/listinfo/icinga-users
> >
> >
>
>
> --
> Best Regards
> Ruchira Kulathunga
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <http://lists.icinga.org/pipermail/icinga-users/
> attachments/20170202/ad7b37fd/attachment.html>
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
> icinga-users mailing list
> icinga-users@lists.icinga.org
> https://lists.icinga.org/mailman/listinfo/icinga-users
>
>
> ------------------------------
>
> End of icinga-users Digest, Vol 38, Issue 2
> *******************************************
>
_______________________________________________
icinga-users mailing list
icinga-users@lists.icinga.org
https://lists.icinga.org/mailman/listinfo/icinga-users

Reply via email to