Xymon Mailing List Archive search

problem with ext script

list Operaciones Corpresa
Mon, 08 Jul 2013 14:35:40 +0200
Message-Id: <user-401bb7d883f1@xymon.invalid>

Hello Paul,

Thank you by your advice, finally i did some like Jeremy said.

Thank you very much to all.

El 08/07/2013 14:10, Root, Paul T escribió:
Why not just send the output to the server with the xymon command?

*From:*Xymon [mailto:xymon-bounces at xymon.com] *On Behalf Of *Jeremy Laidman
*Sent:* Sunday, July 07, 2013 7:42 PM
*To:* Operaciones
*Cc:* xymon at xymon.com
*Subject:* Re: [Xymon] problem with ext script

On 5 July 2013 23:43, Operaciones <user-1e7642c06451@xymon.invalid <mailto:user-1e7642c06451@xymon.invalid>> wrote:

    So, when i run the script with xymon, show the error:

    ERROR: you must be root


What I generally do in these cases is run the command from root's cron and capture the output in a file that's readable by the Xymon user.  Like so:

*/5 * * * * /sbin/dmraid -r >/tmp/dmraid.out && chgrp xymon /tmp/dmraid.out && chmod 644 /tmp/dmraid.out

Then in the script, in place of "dmraid -r" you just do "cat /tmp/dmraid.out".

J