Is there a way to get a list of all alerts and thresholds?

This support forum board is for support questions relating to Nagios Log Server, our solution for managing and monitoring critical log data.
Locked
Jklre
Posts: 163
Joined: Wed May 28, 2014 1:56 pm

Is there a way to get a list of all alerts and thresholds?

Post by Jklre »

Is there a way to get a list of all alerts and thresholds? I'm looking for a quick query to get a list of them since I have around 3000 or so alerts.

Thank you,
Jeremy
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: Is there a way to get a list of all alerts and threshold

Post by hsmith »

Even though the URL says it's pretty, it's not all that pretty :P

Code: Select all

http://<YOURIPORFQDN>/nagioslogserver/index.php/api/backend/nagioslogserver/alert/_search?pretty
Former Nagios Employee.
me.
Jklre
Posts: 163
Joined: Wed May 28, 2014 1:56 pm

Re: Is there a way to get a list of all alerts and threshold

Post by Jklre »

hsmith wrote:Even though the URL says it's pretty, it's not all that pretty :P

Code: Select all

http://<YOURIPORFQDN>/nagioslogserver/index.php/api/backend/nagioslogserver/alert/_search?pretty

this is good but it looks like there is a limit on the size of the response I'm getting as its only loading a few of the alerts. is there a way to increase the size of the response? Thank you.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Is there a way to get a list of all alerts and threshold

Post by tmcdonald »

Not that I am aware of. What size response are you getting?
Former Nagios employee
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: Is there a way to get a list of all alerts and threshold

Post by hsmith »

How about this?

http://<IP>/nagioslogserver/index.php/api/backend/nagioslogserver/alert/_search?pretty&size=99999
Former Nagios Employee.
me.
Jklre
Posts: 163
Joined: Wed May 28, 2014 1:56 pm

Re: Is there a way to get a list of all alerts and threshold

Post by Jklre »

hsmith wrote:How about this?

http://<IP>/nagioslogserver/index.php/api/backend/nagioslogserver/alert/_search?pretty&size=99999
much better definitely gets me what I need.

Thank you!
jolson
Attack Rabbit
Posts: 2560
Joined: Thu Feb 12, 2015 12:40 pm

Re: Is there a way to get a list of all alerts and threshold

Post by jolson »

Great! Is there anything else we can help you with?

On a sidenote, how have your alert firings been Jklre? Do they seem consistently fine since the update? I know you have a ton of them so I figured you'd be a good test case! ;)
Twits Blog
Show me a man who lives alone and has a perpetually clean kitchen, and 8 times out of 9 I'll show you a man with detestable spiritual qualities.
Locked