Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Riemann interaction with custom service ? #197

Closed
vijaySamanuri opened this issue Apr 8, 2013 · 2 comments
Closed

Riemann interaction with custom service ? #197

vijaySamanuri opened this issue Apr 8, 2013 · 2 comments

Comments

@vijaySamanuri
Copy link

Hi,

I am using "collectd" monitoring tool to collect metrics and sending them as events to riemann using write_riemann plugin.
I am very new to riemann, so i thought it is better to ask here before i proceed further.
my question : is there a way to invoke or call http rest api through riemann if a certain condition is met.
for example, if cpu usage >=90% for certain time interval (say 1 minute) i need to trigger my own service (written in java) along with email alerts.

help me .. and please correct me if am going in the wrong direction !! Thanks in Advance :)

@dch
Copy link
Contributor

dch commented Apr 8, 2013

Best off using the mailing list for this rather than a github issue.

I don't think there's direct support for arbitrary rest calls today, but if you're comfortable extending riemann then I'd suggest looking at how http://riemann.io/api/riemann.pagerduty.html#var-pagerduty is implemented.

@aphyr
Copy link
Collaborator

aphyr commented Apr 8, 2013

Yep, just write a stream like (fn [event] .. ) and use an HTTP library to make your call. For instance:

(require 'clj-http.client :as http)
(where (< 0.9 metric)
  (fn [event]
    (http/get "http://my.service/foo" {:body ... :headers ...}))))

@aphyr aphyr closed this as completed Apr 8, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants