No kapacitor messages sent to Alerta

Hello,

New to Influx and Kapacitor!
I have made a tick script and can see it fire critical alerts using kapacitor show.
I have attempted to setup alerta reporting.
In the kapacitor config file I changed the default alerta config to enabled and added the IP of the alerta VM to the url item. Restart kapacitor after config change.
My tick script alert section looks like this :
|alert()
.id(’{{ .Name }}/{{ index .Tags “OceanRegion” }}’)
.message(’{{ .ID }} is {{ .Level }} LAUs-pr-minute :{{ index .Fields “GoodLAUs”}}’)
.stateChangesOnly()
.crit(lambda: “GoodLAUs” < 1200.0)
.log(’/tmp/alerts.log’)
.alerta()
.resource(‘Hostname or service’)
.event(‘Something went wrong’)

When kapacitor fires critical alerts no packets are sent to alerta. I have checked with wireshark (on the kapacitor VM) and see nothing at all to the alerta IP.

What is missing ?

Thanks,
Lasse

@Lasse Do you see anything in the log about POST requests to Alerta?

Hello,

No, nothing in the kapacitor log either. I can see the critical alert count up when I run kapacitor show.
kapacitor version 1.2.0.

Thanks,
Lasse

@Lasse can you post the Alerta section of your configuration file as well?

kapacitor config for alerta :
[alerta]

Configure Alerta.

enabled = true

The Alerta URL.

url = “http://172.31.36.95

Default authentication token.

token = “”

Default environment.

environment = “Production”

Default origin.

origin = “kapacitor”

@Lasse is the anything about Alerta in the logs? Have you restarted kapacitord since you made those changes? Do you see Starting Alerta Service... or something like that?

Hello,

I had two instances of kapacitor running.
Once I shut them both down and started a new instance it worked.
Many thanks for your help.

Thanks,
Lasse

1 Like