How do you specify the data in an event?

I use this command

__salt__["event.fire"]({}, "vehicle/ixbus")

to raise an event.
I will like to pass some data. Question is where will I pass the data?

after some trial and error. I found out the syntax

from Python code:
__salt__["event.fire"]({"any_name":"some_value", "another_one":1234}, "vehicle/some_event_name")

from web terminal
event.fire "{\"any_name\":\"some_value\", \"another_one\":1234}" "vehicle/some_event_name”'

from SSH terminal
autopi event.fire "{\"any_name\":\"some_value\", \"another_one\":1234}" "vehicle/some_event_name”'

That’s good enough to use.

This topic was automatically closed 33 days after the last reply. New replies are no longer allowed.