Hi there,
I'm working for a client which use vcron.
i have to set some monitoring dashboard to have a look on jobs, for a sample task i set 2 events on Flow tab :
first : On success, run a powershell script
second : On error, run a powershell script
i want to know hoto run these scripts with some vcron variable :
- group name
- job name
- error code
How to run a powershell script with these variables ?
for information im using :
Grafana/InfluxDB
My PowerShell script (sample)
$tigurl = 'http://myGrefanaInfluxServer:8086/write?db=test-db-vcjobs'
$jobgroup
$jobname = "NBA"
$jobvalue=2
$data = "jobsTATUS,host=MyVcronServer, group=$jobgroup, jobname=$jobname value=$jobvalue"
Invoke-WebRequest -uri $tigurl -Method post -Body $data