• C
    chio

    @jared-wiltshire said in Bulk Event Detection Creation:

    when i try to use /rest/v2-full-event-detectors i get the below error

    raise JSONDecodeError("Expecting value", s, err.value) from None
    json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
    

    however, event-dectors still works. Can you confirm the 'state' parameter should be set to the value that will trigger the event?

    posted in User help read more
  • C
    chio

    @Jared-Wiltshire do you have a data structure for creating an event detector? We're connected through the API and have been able to Get the existing even-detectors to look for a model as Swagger doesn't have a lot of information for POST /v2/event-detectors

    Here is the response we get from /v2/event-detectors/data-point/{xid}

    [
      {
        "xid": "ED_e7f4ceb7-baca-4842-b22c-897a4e2d87fe",
        "name": "PCS3 Has Faulted",
        "duration": 5,
        "durationType": "MINUTES",
        "alarmLevel": "CRITICAL",
        "supportedDataTypes": [
          "MULTISTATE"
        ],
        "handlers": [
          "EH_43fde3cf-1c12-483b-820c-9392c38f114e"
        ],
        "description": "PCS3 Has Faulted",
        "eventType": {
          "dataSourceId": 2,
          "dataPointId": 995,
          "pointEventDetectorId": 110,
          "duplicateHandling": "IGNORE",
          "rateLimited": false,
          "typeName": "DATA_POINT"
        },
        "sourceId": 995,
        "rtnApplicable": true,
        "detectorSourceType": "DATA_POINT",
        "validationMessages": [],
        "detectorType": "MULTISTATE_STATE",
        "id": 110
      }
    ]
    

    What i dont see from the return of the GET is how we set the XID of the data point and the level. For example the above is set by a data point on value 8. Im not seeing in the return the XID of the datapoint that triggers this event detector or to look for value 8.

    What are we missing?

    posted in User help read more
  • C
    chio

    Thanks for these thoughts. We're review the JSON idea and Phili's last script.

    Our other thought was to use the real time values every x seconds through API and check if type = binary and name contains "fault" then do some task... this would be outside of Mango though so its not 100% desired but could be a scaleable work around.

    posted in User help read more
  • C
    chio

    We're deploying a new system and the data source has about 1,800 fault bits (200 in each subsystem and 9 subsystems).

    There are binary status bits that indicate faults or alarms of a subsystem. Creating the data points has been relatively automated through the CSV uploader, however, we cannot seem to find a method to automate the creation of level based event detection on each of these bits.

    Does anyone have suggestions or thoughts on how we could automate the creation of these event detectors?

    posted in User help read more
  • C
    chio

    @phildunlap we have not seen that, we'll give it a try. thanks

    posted in User help read more
  • C
    chio

    We have an application where this is a dashboard that provides a high level view of 5 pieces of identical equipment. We also have a detailed page of the equipment that provides more data (meters, faults, alarms). In Mango we have 1 detail page that is then populated based on tags.

    RIght now you have to select the tag from a drop down list. What we're trying to figure out is how can we set the tag from the link.

    For example.. if someone is looking at the summary dashboard that shows all 5 pieces of equipment then they click on Unit ID#2 to go to the detail page we want the detail page to know to set the tag for Unit ID#2.

    Does anyone have ideas on how to do this?

    posted in User help read more
  • C
    chio

    I have a watch list serial chart in a dashboard. I do not want the From and To to be populated by datebar.To and datebar.From instead I want it to always be the trailing 7 days and still enable the user to zoom if desired.

    So ideally it would be like:
    to: datetime.datetime.now()
    from: datetime.datetime.now() - timedelta(days=7)

    Any thoughts on how to achieve this are much appreciated.

    Thanks

    posted in User help read more
  • C
    chio

    This fixed it and i can now login. thanks @MattFox and @phildunlap

    payLoad = {'username': userName, 'password': password}
    session = requests.Session()
    session.headers.update({'Cookie':'XSRF-TOKEN=dc1d54de-fab1-4405-8ccb-ea677aadf7ca','X-Xsrf-Token':'dc1d54de-fab1-4405-8ccb-ea677aadf7ca','Accept': 'application/json', 'Accept-Encoding': 'gzip,deflate,sdch'})
    # session.headers["Content-Type"] = "application/json"
    response = session.post('https://monitoring.[domain].com/rest/v2/login', json=payLoad)
    

    posted in User help read more
  • C
    chio

    Thanks @MattFox for the quick response. swagger is enabled and mango has been reset but now I'm getting a 403 error. I have confirmed the username and password are accurate. Any ideas?

    payLoad = {'username': userName, 'password': password}
    session = requests.Session()
    response = session.post('https://monitoring.[domain].com/rest/v2/login', json=payLoad)
    
    if response.status_code == 200:
        print("Success Logging In")
        print(response.status_code)
        print(response.text)
    else:
        print("Error")
        print(response.status_code)
    

    posted in User help read more