EXTERNAL COMMAND: PROCESS_FILE

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
sigmainformatique
Posts: 74
Joined: Mon Apr 23, 2018 8:11 am

EXTERNAL COMMAND: PROCESS_FILE

Post 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
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

Post by scottwilkerson »

does the nagios user have permissions to delete the file?

Code: Select all

ls -al /app/submit_event_data/remote/eventdata3.ext
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
sigmainformatique
Posts: 74
Joined: Mon Apr 23, 2018 8:11 am

Re: EXTERNAL COMMAND: PROCESS_FILE

Post 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
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: EXTERNAL COMMAND: PROCESS_FILE

Post 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
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked