Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 228F7200B4A for ; Wed, 20 Jul 2016 22:55:03 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 20FFE160A64; Wed, 20 Jul 2016 20:55:03 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 42468160A5B for ; Wed, 20 Jul 2016 22:55:02 +0200 (CEST) Received: (qmail 77670 invoked by uid 500); 20 Jul 2016 20:55:00 -0000 Mailing-List: contact user-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cassandra.apache.org Delivered-To: mailing list user@cassandra.apache.org Received: (qmail 77660 invoked by uid 99); 20 Jul 2016 20:55:00 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 Jul 2016 20:55:00 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 175FDC040A for ; Wed, 20 Jul 2016 20:55:00 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.179 X-Spam-Level: * X-Spam-Status: No, score=1.179 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (1024-bit key) header.d=datastax.com Received: from mx2-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id hOiA8h8lZ6yN for ; Wed, 20 Jul 2016 20:54:57 +0000 (UTC) Received: from mail-qt0-f182.google.com (mail-qt0-f182.google.com [209.85.216.182]) by mx2-lw-us.apache.org (ASF Mail Server at mx2-lw-us.apache.org) with ESMTPS id CF0205FBBE for ; Wed, 20 Jul 2016 20:54:56 +0000 (UTC) Received: by mail-qt0-f182.google.com with SMTP id u25so33201637qtb.1 for ; Wed, 20 Jul 2016 13:54:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=datastax.com; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=RS4SWb34USw/YpWbPHP5ywVCQrW3KgIO1mskmZYEKto=; b=en8yOId6+xMS6zZsRarav/fFh4Dd/B+JPTpFTLMEBKtPFySTTDPsgo7u2m8ioT1LD/ Qew/fJcraj5fROobKv40hOPXzUgDSYmCYfXj/ieZlrkFopMdsN0SEnHzfj5FjTgpWWW2 sqtUS0/a1xJ6LugnQqXAma8C0bYg0I0Gwkcs0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=RS4SWb34USw/YpWbPHP5ywVCQrW3KgIO1mskmZYEKto=; b=EBU6zQ2degdQHoWz4pQj26etlW8hI8xQmglJd0itAxuT8VcUbIWXfwi282tpfXopWA ohWAGaZJuUn9r3vZt1V2speTh8SL/QtQmtilEA3thoIkEwDFhZF/itN9FH2x0+a/iE7n 1GGseNZO5N37QXOGuU4zoFMkRIVeCrev3xs75YWZSEUa8JUaKnZGjOLD0qK4ylAm6hUg +daVyi5MzTz5eE+BFJvBVZHXy4MO0AbSCR3RS6l4rqn1cCoYJ9+479+/pdlLg7IvZsRS 7bKKHRTppNI+RX3/whszPQEpDrS+RBjiqgs58MCq6P1hdvbFcWF33OnK1yzk7IwgjvEe gzhw== X-Gm-Message-State: ALyK8tJe25Hszb29L/urFBZs1iBfsBaIOrX0AH1Vd8pTQukhUxnNyggi+H0uBld5ZOI3A1jnnP3Dv5J0gBinWIGT X-Received: by 10.200.37.252 with SMTP id f57mr77006356qtf.68.1469048090125; Wed, 20 Jul 2016 13:54:50 -0700 (PDT) MIME-Version: 1.0 Received: by 10.140.21.230 with HTTP; Wed, 20 Jul 2016 13:54:49 -0700 (PDT) In-Reply-To: References: From: Ryan Springer Date: Wed, 20 Jul 2016 22:54:49 +0200 Message-ID: Subject: Re: OpsCenter sending alert emails or posting to a url never succeeded. To: user@cassandra.apache.org Content-Type: multipart/alternative; boundary=001a1141136e9227a005381769e3 archived-at: Wed, 20 Jul 2016 20:55:03 -0000 --001a1141136e9227a005381769e3 Content-Type: text/plain; charset=UTF-8 Yuan, If you add a static key=value pair, you need to add it using the "fields=" section. However, when the "fields=" section is used, you must list all of the fields that you want to appear in the POST data. Here is an example that sends message_type and the message itself: fields=message_type=CRITICAL message={message} Try placing this at the end of your posturl.conf where you currently only have "message_type=CRITICAL" Thank you, Ryan Springer Opscenter Provisioning Team On Tue, Jul 19, 2016 at 6:56 PM, Yuan Fang wrote: > Anyone succeeded? > > > > Here is my setting for postUrl. > ================================== > ubuntu@ip-172-31-55-130:/etc/opscenter/event-plugins$ more posturl.conf > > [posturl] > enabled=1 > > # levels can be comma delimited list of any of the following: > # DEBUG,INFO,WARN,ERROR,CRITICAL,ALERT > # If left empty, will listen for all levels > levels= > > # clusters is a comma delimited list of cluster names for which > # this alert config will be eligible to run. > # If left empty, this alert will will be called for events on all clusters > clusters= > > # the URL to send a HTTP POST to > url=https://alert.victorops.com/integrations/generic********* > > # Set a username for basic HTTP authorization > #username=foo > > # Set a password for basic HTTP authorization > #password=bar > > # Set the type of posted data. Available options are 'json' or 'form' > post_type=json > > # Fields specified here will override the default event data fields. > # > # They must be formatted as key-value pair, with key and value separated by > # an equals (=). Each pair after the first must be on its own line, > # indented beyond the first line > # > # You may use tokens found within the default event data for or in > # values. For example, some available keys are: > # cluster, time, level_str, message, target_node, event_source, success, > api_source_ip, user, source_node > # Keys must be encapsulated in {brackets}. > # > #fields=textKey=value > # mixedKey=cluster-{cluster} > # event-msg={message} > message_type=CRITICAL > --001a1141136e9227a005381769e3 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Yuan,

If you add a s= tatic key=3Dvalue pair, you need to add it using the "fields=3D" = section.=C2=A0 However, when the "fields=3D" section is used, you= must list all of the fields that you want to appear in the POST data.=C2= =A0

Here is an example that sends message_type and the messag= e itself:

fields=3Dmessage_type=3DCRITICAL
=C2=A0=C2= =A0 message=3D{message}


Try placing this at the end o= f your posturl.conf where you currently only have "message_type=3DCRIT= ICAL"

Thank you,

Ryan Springer
=
Opscenter Provisioning Team
=
On Tue, Jul 19, 2016 at 6:56 PM, Yuan Fang <= span dir=3D"ltr"><yuan@kryptoncloud.com> wrote:
Anyone succeeded?=C2=A0



Here is my setting for postUrl.
=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D
ubuntu@ip-172-31-55-130:/etc/opscenter/event-p= lugins$ more posturl.conf

[posturl]
=
enabled=3D1

# levels can be comma delimited l= ist of any of the following:
# DEBUG,INFO,WARN,ERROR,CRITICAL,ALE= RT
# If left empty, will listen for all levels
levels= =3D

# clusters is a comma delimited list of cluste= r names for which
# this alert config will be eligible to run.
# If left empty, this alert will will be called for events on all c= lusters
clusters=3D

# the URL to send a = HTTP POST to

# Set a username for = basic HTTP authorization
#username=3Dfoo

# Set a password for basic HTTP authorization
#password=3Dbar

# Set the type of posted data. Available options are= 'json' or 'form'
post_type=3Djson

=
# Fields specified here will override the default event data fie= lds.
#
# They must be formatted as key-value pair, with= key and value separated by
# an equals (=3D). Each pair after th= e first must be on its own line,
# indented beyond the first line=
#
# You may use tokens found within the default event = data for or in
# values. For example, some available keys are:
# =C2=A0 cluster, time, level_str, message, target_node, event_sour= ce, success, api_source_ip, user, source_node
# Keys must be enca= psulated in {brackets}.
#
#fields=3DtextKey=3Dvalue
# =C2=A0 =C2=A0mixedKey=3Dcluster-{cluster}
# =C2=A0 =C2= =A0event-msg=3D{message}
message_type=3DCRITICAL


--001a1141136e9227a005381769e3--