Hi Eric,

 

There was a known issue in creating alerts in DataTorrent’s current gateway 
version. This has been fixed in the RTS 3.7 branch (which will be released 
later this month). The RTS 3.7 release will also include a UI to set the 
alerts, see the history of alerts and get notifications. 

 

If you want a fix to be provided, please contact DataTorrent support for the 
patch.

 

Thanks

 

Sanjay

 

From: "Martin, Eric" <eric.mart...@capitalone.com>
Reply-To: <users@apex.apache.org>
Date: Thursday, December 8, 2016 at 7:16 AM
To: "users@apex.apache.org" <users@apex.apache.org>
Subject: Re: Question on System Alerts API

 

David,

 

I tried with this payload format (with my appId and email) and still got the 
same 500 exception.

 

Here is the entry from the dtgateway.log:

 

2016-12-08 10:15:03,034 WARN com.datatorrent.gateway.C: System alert directory 
creation error

java.io.IOException: Filesystem closed

            at org.apache.hadoop.hdfs.DFSClient.checkOpen(DFSClient.java:838)

            at 
org.apache.hadoop.hdfs.DFSClient.primitiveMkdir(DFSClient.java:3068)

            at org.apache.hadoop.hdfs.DFSClient.mkdirs(DFSClient.java:3049)

            at 
org.apache.hadoop.hdfs.DistributedFileSystem$18.doCall(DistributedFileSystem.java:957)

            at 
org.apache.hadoop.hdfs.DistributedFileSystem$18.doCall(DistributedFileSystem.java:953)

            at 
org.apache.hadoop.fs.FileSystemLinkResolver.resolve(FileSystemLinkResolver.java:81)

            at 
org.apache.hadoop.hdfs.DistributedFileSystem.mkdirsInternal(DistributedFileSystem.java:953)

            at 
org.apache.hadoop.hdfs.DistributedFileSystem.mkdirs(DistributedFileSystem.java:946)

            at org.apache.hadoop.fs.FileSystem.mkdirs(FileSystem.java:1861)

            at com.datatorrent.gateway.C.h(mc:106)

            at com.datatorrent.gateway.C.h(mc:139)

            at 
com.datatorrent.gateway.resources.ws.v2.SystemAlertsResource.createSystemAlert(sb:288)

            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

            at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

            at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

            at java.lang.reflect.Method.invoke(Method.java:498)

            at 
com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)

            at 
com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205)

            at 
com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)

            at 
com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:288)

            at 
com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)

            at 
com.sun.jersey.server.impl.uri.rules.SubLocatorRule.accept(SubLocatorRule.java:134)

            at 
com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)

            at 
com.sun.jersey.server.impl.uri.rules.SubLocatorRule.accept(SubLocatorRule.java:134)

            at 
com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)

            at 
com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108)

            at 
com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)

            at 
com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84)

            at 
com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1469)

            at 
com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1400)

            at 
com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1349)

            at 
com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1339)

            at 
com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416)

            at 
com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:537)

            at 
com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:699)

            at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)

            at 
org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:669)

            at 
org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:457)

            at 
org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:229)

            at 
org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1075)

            at 
org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:384)

            at 
org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)

            at 
org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1009)

            at 
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)

            at 
org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154)

            at 
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)

            at org.eclipse.jetty.server.Server.handle(Server.java:368)

            at 
org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489)

            at 
org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:953)

            at 
org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1014)

            at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:861)

            at 
org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240)

            at 
org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)

            at 
org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:628)

            at 
org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)

            at 
org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)

            at 
org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)

            at java.lang.Thread.run(Thread.java:745)

2016-12-08 10:15:03,036 INFO 
com.datatorrent.gateway.resources.ws.v2.WSResource: Caught exception in 
processing web service: java.io.IOException: Filesystem closed

 

 

From: David Yan <da...@datatorrent.com>
Reply-To: "users@apex.apache.org" <users@apex.apache.org>
Date: Wednesday, December 7, 2016 at 4:15 PM
To: "users@apex.apache.org" <users@apex.apache.org>
Subject: Re: Question on System Alerts API

 

Hi Eric: 

 

Can you send us the log entries of dtgateway.log when the 500 error happens? 

Assuming the application id is applications.application_1480063135007_0543, the 
payload for setting an alert for when an application is not in RUNNING state 
would be something like:

 

{

"condition": "_topic['applications.application_1480063135007_0543']['state'] != 
'RUNNING'",

"email":"x...@example.com",

"description": "Application no longer running",

"timeThresholdMillis":"60000"

}

 

David

 

On Wed, Dec 7, 2016 at 12:53 PM, Martin, Eric <eric.mart...@capitalone.com> 
wrote:

Hi All,

 

I am looking to set system alerts based on different metrics of an application. 
The documentation on the website gives an api that can do this but I keep 
getting a 500 error when calling it, and I am fairly certain it is due to 
format of the payload that I am sending. Can someone provide an example of what 
a payload should actually look like for this call? For example, how should I 
format the payload if I want to set an alert for when an application is no 
longer in “Running” state?

 

The specs to the API are:

 

PUT /ws/v2/systemAlerts/alerts/{name}

 

Payload:

{

       "condition":"{condition in javascript}",

        "email":"{email}",

        "description": "{description}",

        "timeThresholdMillis":"{time}"

}

 

 

The information contained in this e-mail is confidential and/or proprietary to 
Capital One and/or its affiliates and may only be used solely in performance of 
work or services for Capital One. The information transmitted herewith is 
intended only for use by the individual or entity to which it is addressed. If 
the reader of this message is not the intended recipient, you are hereby 
notified that any review, retransmission, dissemination, distribution, copying 
or other use of, or taking of any action in reliance upon this information is 
strictly prohibited. If you have received this communication in error, please 
contact the sender and delete the material from your computer.

 

 

The information contained in this e-mail is confidential and/or proprietary to 
Capital One and/or its affiliates and may only be used solely in performance of 
work or services for Capital One. The information transmitted herewith is 
intended only for use by the individual or entity to which it is addressed. If 
the reader of this message is not the intended recipient, you are hereby 
notified that any review, retransmission, dissemination, distribution, copying 
or other use of, or taking of any action in reliance upon this information is 
strictly prohibited. If you have received this communication in error, please 
contact the sender and delete the material from your computer.

Reply via email to