I have demo.csv file which is being continuously monitored, this file contains 3 fields namely servername, jobname and status.
This demo file is continuously being updated by another script.
Demo file contents are like this
Now i am monitoring the status of the jobs via splunk, so i have created a alert which will trigger and send a mail, whenever a job fails. The mail contains table format output of search query which has servename, jobname and status columns.
Now i am writing a python script which will be invoked by this alert along with the mail. So this python will update the status of respective job from "fail" to "success" in the demo.csv file.
But it seems my python script is not working, can anyone help me to write this python script?