Comments (6)
You didn't include the output of the alerta heartbeats --alert
command. You should have gotten something like this ...
$ alerta --profile heroku heartbeats --alert
ID ORIGIN CUSTOMER TAGS CREATED RECEIVED LATENCY TIMEOUT SINCE STATUS
------------------------------------ --------------------- ---------- ---------------------------------------- ------------------- ------------------- --------- --------- ------------------ --------
52f1019d-fb5f-4970-bc79-0b302d2a166a riemann/ubuntu-bionic 5.0.0 2018/09/03 21:18:24 2018/09/03 21:18:24 0ms 86400s 192 days, 23:49:15 expired
7dd54c56-99d0-4097-b52d-2582ac2d43ba riemann/localhost 5.0.0 2018/09/03 20:39:54 2018/09/03 20:39:54 0ms 86400s 193 days, 0:27:45 expired
47027ee3-3897-4999-9e58-a59f1b7b7a6e system1 environment:Production,group:Network,foo 2018/11/17 15:32:16 2018/11/17 15:32:16 247ms 10s 118 days, 4:35:24 expired
e0ae60d7-9d7b-44db-99ff-ebccba283120 system2 environment:Production,group:Network,foo 2018/11/17 15:32:28 2018/11/17 15:32:28 230ms 10s 118 days, 4:35:11 expired
4719ab4f-d5bb-495a-a7c1-0a645e007ef2 dc1-oem-02 environment:Development,group:Network 2018/11/17 15:42:58 2018/11/17 15:42:58 246ms 2s 118 days, 4:24:41 expired
0a8bb017-4fdf-4b4b-9f6e-e37e0d49ae19 baz 2019/02/11 12:20:52 2019/02/11 12:20:52 71ms 86400s 32 days, 7:46:47 expired
Alerting 6 heartbeats [####################################] 100%
Please paste your output below. Thanks.
from python-alerta-client.
alerta_cli.conf
[DEFAULT]
timezone = Europe/Paris
output = json
endpoint = http://localhost:5000
key = vCO4jNDDVPO249nZlvkuRBoiHI6R9svQ73nNq8bp
sslverify = off
debug = yes
Output
alerta --config-file alerta_cli.conf heartbeats --alert
send: b'GET /heartbeats HTTP/1.1\r\nHost: localhost:5000\r\nUser-Agent: python-requests/2.21.0\r\nAccept-Encoding: gzip, deflate\r\nAccept: */*\r\nConnection: keep-alive\r\nAuthorization: Key vCO4jNDDVPO249nZlvkuRBoiHI6R9svQ73nNq8bp\r\n\r\n'
reply: 'HTTP/1.1 200 OK\r\n'
header: Date: Fri, 15 Mar 2019 20:32:04 GMT
header: Server: Apache/2.4.29 (Ubuntu)
header: Content-Length: 365
header: Access-Control-Allow-Origin: http://localhost
header: Vary: Origin
header: Keep-Alive: timeout=5, max=100
header: Connection: Keep-Alive
header: Content-Type: application/json
body: {"heartbeats":[{"createTime":"2019-03-15T16:02:54.093Z","customer":null,"href":"http://localhost:5000/heartbeat/03e0be4a-20aa-4573-baf3-4c799fd62c29","id":"03e0be4a-20aa-4573-baf3-4c799fd62c29","latency":0,"origin":"toto","receiveTime":"2019-03-15T16:02:54.093Z","since":16150,"status":"expired","tags":[],"timeout":20,"type":"Heartbeat"}],"status":"ok","total":1}
[
{
"createTime": "2019-03-15T16:02:54.093Z",
"customer": null,
"href": "http://localhost:5000/heartbeat/03e0be4a-20aa-4573-baf3-4c799fd62c29",
"id": "03e0be4a-20aa-4573-baf3-4c799fd62c29",
"latency": 0,
"origin": "toto",
"receiveTime": "2019-03-15T16:02:54.093Z",
"since": 16150,
"status": "expired",
"tags": [],
"timeout": 20,
"type": "Heartbeat"
}
]
from python-alerta-client.
What version of the API and CLI is this? For example ...
$ alerta --profile heroku version
alerta 6.8.1
alerta client 6.8.1
requests 2.19.1
click 7.0
from python-alerta-client.
With debug
alerta --config-file alerta_cli.conf version
send: b'GET /management/status HTTP/1.1\r\nHost: localhost:5000\r\nUser-Agent: python-requests/2.21.0\r\nAccept-Encoding: gzip, deflate\r\nAccept: */*\r\nConnection: keep-alive\r\nAuthorization: Key vCO4jNDDVPO249nZlvkuRBoiHI6R9svQ73nNq8bp\r\n\r\n'
reply: 'HTTP/1.1 200 OK\r\n'
header: Date: Fri, 15 Mar 2019 21:07:42 GMT
header: Server: Apache/2.4.29 (Ubuntu)
header: Content-Length: 422
header: Access-Control-Allow-Origin: http://localhost
header: Vary: Origin,Accept-Encoding
header: Content-Encoding: gzip
header: Keep-Alive: timeout=5, max=100
header: Connection: Keep-Alive
header: Content-Type: application/json
body: {"application":"alerta","metrics":[{"description":"Total number of alerts in the database","group":"alerts","name":"total","title":"Total alerts","type":"gauge","value":4},{"count":5257,"description":"Total time and number of alert queries","group":"alerts","name":"queries","title":"Alert queries","totalTime":68440,"type":"timer"},{"count":2633,"description":"Total time and number of count queries","group":"alerts","name":"counts","title":"Count alerts","totalTime":32446,"type":"timer"},{"count":1,"description":"Total time to tag number of alerts","group":"alerts","name":"tagged","title":"Tagging alerts","totalTime":15,"type":"timer"},{"count":6,"description":"Total time and number of alerts with status changed","group":"alerts","name":"status","title":"Alert status change","totalTime":104,"type":"timer"},{"description":"Allow consoles to auto-refresh alerts","group":"switch","name":"auto-refresh-allow","title":"Alerta console auto-refresh","type":"text","value":"ON"},{"description":"Allow alerts to be submitted via the API","group":"switch","name":"sender-api-allow","title":"API alert submission","type":"text","value":"ON"}],"time":1552684062436,"uptime":18818695,"version":"6.8.1"}
alerta 6.8.1
alerta client 6.8.1
requests 2.21.0
click 7.0
from python-alerta-client.
If you comment out the "json output" line it will work ...
[DEFAULT]
timezone = Europe/Paris
; output = json
endpoint = http://localhost:5000
key = vCO4jNDDVPO249nZlvkuRBoiHI6R9svQ73nNq8bp
sslverify = off
debug = yes
This is a bug. It should still generate alerts no matter what output format you use.
from python-alerta-client.
Fixed using the workaround. Thank you.
from python-alerta-client.
Related Issues (20)
- Configurable timeout for alerts created from heartbeats
- Get config request ignores "SSL verify" setting
- severity used to close stale heartbeat alerts is hardcoded to 'normal' HOT 2
- Handle when config cannot be loaded from server
- Error when creating new users HOT 1
- output=silent (crontab mode) HOT 7
- Add generating heartbeat alerts to python SDK HOT 1
- Wheel name and python package name are different HOT 4
- `alerta heartbeats --alert` broken HOT 4
- TypeError: Object of type 'function' is not JSON serializable from CLI when running heartbeat alert HOT 1
- TypeError: Object of type 'function' is not JSON serializable from CLI when running heartbeat alert HOT 2
- SDK passing page size as "None" if not set
- alerta delete not removing all alerts HOT 1
- TypeError: 'User' object is not subscriptable
- Cron job for stale or slow heartbeats do not accept arguments specified in the documentation HOT 1
- Set alarm status in send_alarm HOT 3
- Add Python3 typing
- Alerta doesn't return all alert with get_alerts
- Unable to handshake between alerta server and Web UI HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from python-alerta-client.