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
EXTERNAL COMMAND: PROCESS_FILE
-
sigmainformatique
- Posts: 74
- Joined: Mon Apr 23, 2018 8:11 am
EXTERNAL COMMAND: PROCESS_FILE
Last edited by sigmainformatique on Thu Aug 02, 2018 4:49 am, edited 1 time in total.
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: EXTERNAL COMMAND: PROCESS_FILE
does the nagios user have permissions to delete the file?
Code: Select all
ls -al /app/submit_event_data/remote/eventdata3.ext-
sigmainformatique
- Posts: 74
- Joined: Mon Apr 23, 2018 8:11 am
Re: EXTERNAL COMMAND: PROCESS_FILE
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
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
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: EXTERNAL COMMAND: PROCESS_FILE
Great! Closingsigmainformatique 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