by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • May 18 2016 15:33
    @satterly banned @sandeepl337
Rémy Andreetti
@Remy-Andreetti
Thank you ! Ok now, can i delete alerts with specific status like closed ?
Nick Satterly
@satterly
Yes. you use a filter. Have you tried typing ‘—help’ ?
$ alerta delete --help
Usage: alerta delete [OPTIONS]

  Delete alerts.

Options:
  -i, --ids UUID       List of alert IDs (can use short 8-char id)
  -q, --query QUERY    severity:"warning" AND resource:web
  -f, --filter FILTER  KEY=VALUE eg. serverity=warning resource=web
  -h, --help           Show this message and exit.
PedroMSantosD
@PedroMSantosD
Hi, I have a question on status_change method on alerta plugins:
def status_change(self, alert, status, text):
when I the change is triggered,
is the alert, the alert PRIOR to change, or already updated?
likewise, status, text; do they reflect the NEW status/text for the alert?
or are they the ones prior to the update?
finally, on this integrations, the alert Must not be updated,right? only trigger the integration, with the parameters
Steven Bambling
@smbambling
After a little time away I'm trying to bootstrap myself back up on Alerta. Reading the Docs I don't see the concept of setting an occurrence threshold before a event is passed on to a plugin to page/mail, etc. Is that correct? I would need to fork one fo the plugins and have the logic added in there to drop the event if it didn't meet X,Y,Z criteria ?
kavyakul
@kavyakul
Hi,
I am not able to add notes, it gives me following error:
image.png
I am doing this via admin user
Nick Satterly
@satterly
@kavyakul upgrade.
2 replies
kavyakul
@kavyakul

@satterly can you please help to point out which setting might be causing the auto timeout of ACK alerts

I have not changed any timeout config

2 replies
image.png
kavyakul
@kavyakul
Its regarding urlmon integration.
I am unable to run alerta-urlmon (alerta version 7.5.5). Am I missing something?
Successfully installed alerta-urlmon-3.3.0
alerta@a0a27ce0f1b2:/urlmon$ alerta-urlmon
Traceback (most recent call last):
  File "/venv/bin/alerta-urlmon", line 11, in <module>
    load_entry_point('alerta-urlmon==3.3.0', 'console_scripts', 'alerta-urlmon')()
  File "/venv/lib/python3.7/site-packages/pkg_resources/__init__.py", line 490, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/venv/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2853, in load_entry_point
    return ep.load()
  File "/venv/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2453, in load
    return self.resolve()
  File "/venv/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2459, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/venv/lib/python3.7/site-packages/urlmon.py", line 54, in <module>
    import settings
ModuleNotFoundError: No module named 'settings'
Pantelis Karamolegkos
@pkaramol
Ιs alerta compatible with postrgesql12 ? has it been tested? Would you advise against using it with postgresql12?
Pantelis Karamolegkos
@pkaramol

I have set up the following variables

AUTH_REQUIRED=true
SIGNUP_ENABLED=false

however, when accessing the web page, I am able to see the dashboard of alerta even without being logged in? Is this normal? Shouldn't I be landing on a login page?

Screenshot-2020-05-28-at-5-43-07-PM.png

Nick Satterly
@satterly
@pkaramol i’ve answered this in your github issue alerta/alerta#1229
and i would probably advise against postgres 12 at this stage. i need to update the test pipeline to take into account multiple versions of database. at the moment i only test against the lowest supported versions of mongo and postgres.
Lars Van Casteren
@cukal

Hi, quick question: I'm running docker 7.5.5 set up with Prometheus / Alertmanager, all working, all good!
I noticed that there are some nightly incoming alerts that make it all the way through to Alerta and after a while get cleared automatically by alertmanager so all good.

I can't seem to find them anymore using the alerta frontend after a while? Is this the housekeeping that removes them? Checking the About page I do see count alerts etc but there's nothing anymore.

If so, how can I increase the housekeeping parameter to, let's say, keep everything for 1 month?

Thanks!

Lars Van Casteren
@cukal
Just came across: alerta/docker-alerta#119
I guess that's what I need
annu9103
@annu9103
hi ....could you please suggest me the curl command for last 10 min alert available in alert dashboard like $ curl http://localhost:8080/alerts?lastReceiveTime <= to-date (now) \
-H 'Authorization: Key demo-key' (i want alarm that are generated in last 10 min )
annu9103
@annu9103
@satterly.... hi ....could you please suggest me the curl command for last 10 min alert available in alert dashboard like $ curl http://localhost:8080/alerts?lastReceiveTime <= to-date (now) \
-H 'Authorization: Key demo-key' (i want alarm that are generated in last 10 min )
annu9103
@annu9103
@sandeepl337 could you please suggest me the curl command for last 10 min alert available in alert dashboard like $ curl http://localhost:8080/alerts?lastReceiveTime <= to-date (now) \
-H 'Authorization: Key demo-key' (i want alarm that are generated in last 10 min )
annu9103
@annu9103
??
annu9103
@annu9103
how to write api query for generate last 10 min alarm
Lars Van Casteren
@cukal
@satterly Hi Nick, thanks for Alerta!
I'm setting these env vars in docker-compose.yml (7.5.5) :
DEFAULT_EXPIRED_DELETE_HRS = 0
DEFAULT_INFO_DELETE_HRS = 0
but still closed tickets get removed. Checked inside the container and the env vars are set. Any idea where I should start looking?
Lars Van Casteren
@cukal
When checking the logs I do see:
web_1 | DELETE FROM alerts web_1 | WHERE (status IN ('closed', 'expired') web_1 | AND last_receive_time < (NOW() at time zone 'utc' - INTERVAL '2 hours'))
Lars Van Casteren
@cukal
hmm, it seems the crontab inside the docker container is doing the housekeeping call without--expired, defaulting it to 2h, possible?
Nick Satterly
@satterly
none of those variables are supported as environment variables
The docker readme lists all of the supported env vars https://hub.docker.com/repository/docker/alerta/alerta-web
if you need to set other variables use alertad.conf file
Lars Van Casteren
@cukal
Thanks for your reply! I backtracked the housekeeping command to the --expired value and figured that what's causing it because the env variable I set doesn't get used inside the container and indeed, it's not in the list. No worries, I'll add them. thanks again for Alerta Nick!
Nick Satterly
@satterly
No problem.
SergioT
@stiurin

running alerta 7.4.4 and kapacitor 1.5.5

running a kapacitor test alert, discovered '/alert' path gets prepended to the url var.
I presume production configuration would do the same.

I did not find a way how to change or remove this prepended path.
The only solution I can think of making alerts hit my custom webhook listener is to rename my custom webhook to 'alert'

is there a better-known supported solution?

Nick Satterly
@satterly
why do you want to remove /alert from the path? It won’t work without it.
SergioT
@stiurin
My assumption was Kapacitor is using a bespoke webhook JSON message
If I just use Alerta FQDN with no path to any custom webhook, then test alerts fail with 405 error
I just can't find documentation on what has to be enabled and configured on Alerta to accept Kapacitor messages
SergioT
@stiurin

Kapacitor config
url = "https://alerta.example.com"
would result in alerts being sent as
POST https://alerta.example.com/alert

to which Alerta would respond '405 Not Allowed'

Nick Satterly
@satterly
Is that the correct Alerta API endpoint? Are you using docker Alerta by any chance? If so it has /api on the end.
SergioT
@stiurin
you are genius, this has worked!
i am using Docker container, indeed
/api
and
token-prefix = "Key"
made it all work
i could not find this in documentation, thank you for guidance!
annu9103
@annu9103
any one suggest me curl command for last 10 min alert available in alert dashboard like $ curl http://api.local.alerta.io:8080/alerts?sort-by=lastReceiveTime&from-date=2020-05-29T14%3A27%3A54.931Z (i want alarm that generated in last 10 min ) this this hardcode ....
i have used sort-by=lastReceiveTime&from-date=$(date +%FT%T.%3NZ -d "- 10 minutes")