forked from capensis/canopsis
-
Notifications
You must be signed in to change notification settings - Fork 0
send_event
Httqm edited this page Apr 22, 2013
·
8 revisions
With send_event
command you can send event (via webservice) to Canopsis.
Firstly, you must add one user in CPS_event_admin
group.
Secondly, get user's Authentication key
in web UI (Build -> Accounts -> right-click -> Authentication key
)
Two way, use directly in canopsis environment or download on github project send_event.
(For window)
Now you can use command:
echo '{
"connector_name": "vtom",
"event_type": "log",
"source_type": "resource",
"component": "NOM_de_la_machine",
"resource": "NOM_du_JOB",
"state": 0,
"output": "MESSAGE",
"display_name": "DISPLAY_NAME"
}
' | send_event -s <CANOPSIS>:8082 -a <AUTH_KEY>
Note: you can specify timestamp
field for specify unix timestamp of event.
For more informations about event format you can read: Event specification