Active alarms seen on NSX manager only when queried from API but not visible in GUI
search cancel

Active alarms seen on NSX manager only when queried from API but not visible in GUI

book

Article ID: 383171

calendar_today

Updated On:

Products

VMware NSX

Issue/Introduction

These alarms are seen only when queried using API but are not present in NSX GUI 

The API call curl -v -k -u '<user>' -X GET "https://<nsx-manager-fqdn-or-ip>/api/v1/alarms? Status=OPEN" returns results:

However, the NSX GUI shows no alarms:

Environment

VMware NSX

Cause

The issue is observed when active alarms remains stale on NSX manager. 

Resolution

To resolve these stale alarms execute below API using POST method

/api/v1/alarms/<alarm-id>?action=set_status

For Example, 

POST /api/v1/alarms/?action=set_status&new_status=RESOLVED&status=OPEN

i.e. curl -v k -u '<user>' -X POST "https://<nsx-manager-fqdn-or-ip>/api/v1/alarms/?action=set_status&new_status=RESOLVED&status=OPEN"

The set_status can be OPEN, ACKNOWLEDGED, SUPPRESSED, or RESOLVED; If set_status is SUPPRESSED the suppress duration must also be specified

Additional Information

Refer to the NSX API Guide for more information.