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 ItemThanks
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=trueThen you would need to use something like PostMan or nodejs to make a POST request to
/rest/latest/testing/raise-eventThe 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=trueIn 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=falseThanks 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 thetesting.
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!