NX Cloud to send alerts/notifications
AnsweredHi there!
We are having problems with clients that have a bad power supply but at the same time are reluctant to invest in a UPS. They come back on Mondays and realise that the server was down for the whole weekend and also happened for them to be burglarized.
We configured a lot of notifications to keep an eye on the system's health (camera disconnections, network problems, etc.) but it does not help when the entire system goes offline due to a power outage as for obvious reasons, the system is incapable to send any notification when has no power ;)
I was wondering if NX Cloud does not have the ability (apparently it doesn't, I couldn't find) to send a notification when it loses access to a certain site for whatever reason server is down, Internet offline), it won't matter.
If the ability is confirmed inexistent, couldn't it be implemented easily, can I suggest/ask for this upgrade? I'm sure it'd be very useful. In my outsider view, it's just a matter of the same Cloud counter/agent that polls the sites from time to time the check their availability to be able to send a notification to a certain selectable user regarding a certain selectable site.
-
Hello,
If the ability is confirmed inexistent, couldn't it be implemented easily, can I suggest/ask for this upgrade?
You could use Cloud API for polling the system status.
If you take this script as a basis
and modify the main() as following:
def main():
oauth_payload = create_payload()
oath_response = request_api(CLOUD_URL, f'/cdb/oauth2/token', 'POST', json=oauth_payload)
primary_token = get_token(oath_response)
oath_response = request_api(CLOUD_URL, f'/cdb/oauth2/token', 'POST', json=oauth_payload)
secondary_token = get_token(oath_response)
primary_token_header = create_header(primary_token)
system_info = request_api(CLOUD_URL, f'/cdb/system/get', 'GET',
headers=primary_token_header, verify=False)
print(system_info)
secondary_token_header = create_header(secondary_token)
request_api(CLOUD_URL, f'/cdb/oauth2/token/{primary_token}', 'DELETE', headers=secondary_token_header)it would give a list of system, where you find the status by checking the "stateOfHealth" value.
Please sign in to leave a comment.
Comments
2 comments