bugy / script-server

Web UI for your scripts with execution management
Other
1.57k stars 248 forks source link

Alerting #516

Closed carmenqueasyy closed 2 years ago

carmenqueasyy commented 2 years ago

Hi team, i have some question. How can i alerting myself about run specific script on script-server? Situation: My mates able to run scripts with security risk, and I should receive email about it, example : " %user run %scriptname with %somevar ". I can add function email alerting in my "danger" script, but i don't know how get USERNAME current webUI user. Can you suggest a solution?

bugy commented 2 years ago

Hi @carmenqueasyy could you check this one please? https://github.com/bugy/script-server/issues/200#issuecomment-478363470

Apparently this is undocumented feature :sweat_smile:

carmenqueasyy commented 2 years ago

Hi @carmenqueasyy could you check this one please? #200 (comment)

Apparently this is undocumented feature sweat_smile Exactly what is needed!!! Thank you very much for your work!

carmenqueasyy commented 2 years ago

@bugy Where can i read full list "notificationParameters" ?

bugy commented 2 years ago

I think this option is called "notification_fields" now (not notificationParameters). All allowed fields:

carmenqueasyy commented 2 years ago

@bugy alert don't work with cyrilic symbol in name script, and i cant disable notifyOnStart - ( "notifyOnStart": false - not working). Can i get arguments passed in my script?

bugy commented 2 years ago

https://github.com/bugy/script-server/blob/9a57ce15903c81bcb537b872f1330ee55ba31563/samples/configs/parameterized.json#L180

please check this one Instead of audit name you could also use ${auth.username}