Page 1 of 1

EXTERNAL COMMAND: PROCESS_FILE

Posted: Wed Aug 01, 2018 12:04 pm
by sigmainformatique
Hello,
I am trying tu use EXTERNAL COMMAND : PROCESS_FILE
The issue is : file don't deleted after processing.
The command line :
echo "[`date +%s`] PROCESS_FILE;/app/submit_event_data/remote/eventdata3.ext;1" > nagios.cmd
The external commands from the file are processed
example :
[1533140044] PROCESS_SERVICE_CHECK_RESULT;preprod;test;2;This is an example plugin out|size=36
[1533140044] PROCESS_SERVICE_CHECK_RESULT;preprod;test2;2;This is an example plugin out|size=46
But the file remains even with delete option
Thank's

Re: EXTERNAL COMMAND: PROCESS_FILE

Posted: Wed Aug 01, 2018 1:02 pm
by scottwilkerson
does the nagios user have permissions to delete the file?

Code: Select all

ls -al /app/submit_event_data/remote/eventdata3.ext

Re: EXTERNAL COMMAND: PROCESS_FILE

Posted: Thu Aug 02, 2018 4:45 am
by sigmainformatique
Hello,
The file was -rw-rw-rw- but he was "root:root", so the delete option don't work
I made a "chown nagios: " on the file, and then it was deleted
Thank's

Re: EXTERNAL COMMAND: PROCESS_FILE

Posted: Thu Aug 02, 2018 7:42 am
by scottwilkerson
sigmainformatique wrote:Hello,
The file was -rw-rw-rw- but he was "root:root", so the delete option don't work
I made a "chown nagios: " on the file, and then it was deleted
Thank's
Great! Closing