[RHAS] RMA not running external action

Remote Monitoring Agent for Linux, FreeBSD, and other UNIX-like platforms.
Post Reply
r3boot
Posts: 7
Joined: Wed Jun 08, 2005 7:50 am
Contact:

[RHAS] RMA not running external action

Post by r3boot »

Hi,

I'm busy attaching our Linux servers to our hostmonitor (5.12) setup. So I've downloaded rma_lin.tgz (1.00), installed it and have it up and running. Performing tests works like a charm, even with self-written test scripts. However, one of the alert actions here is "reboot when something fails", and I need to implement this for the linux systems.

So I've created a simple test (cpu usage) and 1 single action, which tries to run an external script on the RMA. However, when I actually trigger the test and try to run the action I get the following error in the verbose RMA output:

Code: Select all

[rma][15:54:06]  1.2.3.4    TCP connection accepted
[rma][15:54:06]  1.2.3.4    <-- Correct HM request received
[rma][15:54:06]  1.2.3.4    Unknown command "ACT-ExternalCmd"
[rma][15:54:06]  1.2.3.4    --> request rejected or operation failed (500)
[rma][15:54:06]  rma             Session closed, wait for next ..
Running rma through strace did not yield any interesting results; afaik there's a check for ACT-ExternalCmd, and if it's not there, it just logs and continue. I didn't see any exec* calls, which make me think that this feature just isn't there.

Am I missing something here or am I doing something wrong? Does somebody know how to run external action scripts on Linux RMA's? Do I need to file a feature-request? How hard is it to write this command if one has the source code for RMA?

If all else fails I can always write my own thing based on running an external script on the hostmonitor system itself, which in turn runs commands on the linux systems using ssh, but this is something I'd rather not do (from the my-colleagues-need-to-work-with-this pov, not from the I-like-to-code pov ;) )
KS-Soft
Posts: 12821
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

RMA for Linux cannot perform actions, yet.
There is workaround: you may create additional "External" test that will start your script. Then you may use HM Script action assigned to main test (CPU Usage test) to enable and disable auxiliary test when nesessary.
Not very nice solution but it will work...

I think we implement some actions for RMA-Linux in July or August

Regards
Alex
lgrant
Posts: 2
Joined: Wed Jun 08, 2005 9:23 pm

RMA for Linux Executing files

Post by lgrant »

This feature would be great. We use Host monitor quite a bit and I would love to be able to use it to automate administrative tasks on Linux servers. Imagine how useful a test revealing low disk space could become if it then triggered a script that archived log files and cleared space, aleviating the problem.
r3boot
Posts: 7
Joined: Wed Jun 08, 2005 7:50 am
Contact:

Post by r3boot »

Hi Alex,

Thanks for the tip regarding additional tests, just tried it, and it works. Can't wait for the new release of RMA tho :) Being able to run actions on linux boxen is imho a really needed thing. I'll be monitoring this forum and the download page ;)
sdendle
Posts: 9
Joined: Mon Jun 13, 2005 5:42 pm

Post by sdendle »

I am also looking forward to adding actions to our tests.
Any indocation on which actions will be available?
KS-Soft
Posts: 12821
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

I think on first stage we implement the following actions
- execute external command
- syslog
- TCP/UDP send

Regards
Alex
KS-Soft
Posts: 12821
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

Done. RMA 1.20 for Linux and FreeBSD available at www.ks-soft.net/hostmon.eng/downpage.htm
RMA for SunOS will be available shortly

Regards
Alex
jromariz
Posts: 264
Joined: Wed Apr 03, 2002 6:00 pm
Location: Brasil

Post by jromariz »

Good news Alex!


Regards,


Jromariz.
r3boot
Posts: 7
Joined: Wed Jun 08, 2005 7:50 am
Contact:

Post by r3boot »

Great news Alex :) I'll install them today and let you know the results.
Post Reply