Please Note This forum exists for community support for the Mango product family and the Radix IoT Platform. Although Radix IoT employees participate in this forum from time to time, there is no guarantee of a response to anything posted here, nor can Radix IoT, LLC guarantee the accuracy of any information expressed or conveyed. Specific project questions from customers with active support contracts are asked to send requests to support@radixiot.com.

Radix IoT Website Mango 3 Documentation Website Mango 4 Documentation Website

How to simulate system events?


  • Dear All,

    We will use set point handler to take an action for system events which exist on the Event Types tab of Event Handler. We would like to simulate system events in below. Can you please help us how can we simulate these alarms?

    Data Lost Event
    Rejected Work Item

    Thanks

    Response from Mango Developers:

    We have a Testing REST controller that lets you raise any event you want. It would require you to setup Mango in test mode using the env properties:

    #Test mode for Mango
    testing.enabled=true
    testing.restApi.enabled=true

    Then you would need to use something like PostMan or nodejs to make a POST request to
    /rest/latest/testing/raise-event

    The trick will be figuring out the Payload for the event type which I can probably help with. If you want to proceed like this let me know.


  • @Dave-Frazier Hi,

    I could not find the parameters in the env.properties. Should I directly add the parameters like below to env.properties?

    #Test mode for Mango
    testing.enabled=true
    testing.restApi.enabled=true

    In our env.properties document there is a part like below. Shout I enable rest.testMode=false part?

    #Rest API Configuration
    rest.enabled=true

    #Enable to make JSON More readable
    rest.indentJSON=false
    #Cross Origin Request Handling
    rest.cors.enabled=false
    rest.cors.allowedOrigins=
    rest.cors.allowedMethods=PUT,POST,GET,OPTIONS,DELETE,HEAD
    rest.cors.allowedHeaders=content-type,x-requested-with,authorization
    rest.cors.exposedHeaders=
    rest.cors.allowCredentials=false
    rest.cors.maxAge=3600
    rest.disableErrorRedirects=false
    # enable test endpoints
    rest.testMode=false

    Thanks in advance,


  • @nurr said in How to simulate system events?:

    rest.testMode=false

    What version of Mango are you using? In 4.0 rest.testMode=false has been replaced by the testing. settings.


  • Hi @terrypacker ,

    Although we upgraded v3.7.7 to v.4.0.0.beta2, it is still written ' rest.testMode=false ' on the env.properties file.

    Hi @Dave-Frazier ,
    Additionally, can please share documentation for /rest/latest/testing/raise-event ? How can I use it?

    Thanks!