Alarm via API returns wrong value

Forum for questions and support relating to the 1.34.x releases only.
Post Reply
tranzmatt
Posts: 2
Joined: Fri Jul 10, 2020 8:46 pm

Alarm via API returns wrong value

Post by tranzmatt »

I'm working with pyzm, but I think this applies to ZM itself.

When I send the arm() command, which posts:

Code: Select all

[DEBUG 1] make_request called with url=http://192.168.1.247/zm/api/monitors/alarm/id:3/command:on.json payload={} type=get query={}
Where mid=3. I get a return json of something like

Code: Select all

ARM: {'status': 'Alarmed event id: 2'}
But in the web-ui, ID #3 seems to have been created instead.

Can anyone explain the discrepancy? Shouldn't "3" be returned in the json string? I've tested multiple times.
User avatar
asker
Posts: 1553
Joined: Sun Mar 01, 2015 12:12 pm

Re: Alarm via API returns wrong value

Post by asker »

This seems to be a zmu bug. If you run sudo -u www-data zmu -m<mid> -a -U admin -P <password> you'll see it returns a wrong eid. May want to log it in ZM GH repo - but I think this is a known issue. Needs to be solved, either way.
I no longer work on zmNinja, zmeventnotification, pyzm or mlapi. I may respond on occasion based on my available time/interest.

Please read before posting:
How to set up logging properly
How to troubleshoot and report - ES
How to troubleshoot and report - zmNinja
ES docs
zmNinja docs
tranzmatt
Posts: 2
Joined: Fri Jul 10, 2020 8:46 pm

Re: Alarm via API returns wrong value

Post by tranzmatt »

Ok, I've submitted a ticket to the github repo.
Post Reply