View previous topic :: View next topic |
Author |
Message |
r3boot
Joined: 08 Jun 2005 Posts: 7
|
Posted: Wed Jun 08, 2005 8:23 am Post subject: [RHAS] RMA not running external action |
|
|
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: |
[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 ) |
|
Back to top |
|
|
KS-Soft
Joined: 03 Apr 2002 Posts: 12792 Location: USA
|
Posted: Wed Jun 08, 2005 10:46 am Post subject: |
|
|
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 |
|
Back to top |
|
|
lgrant
Joined: 08 Jun 2005 Posts: 2
|
Posted: Wed Jun 08, 2005 9:55 pm Post subject: RMA for Linux Executing files |
|
|
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. |
|
Back to top |
|
|
r3boot
Joined: 08 Jun 2005 Posts: 7
|
Posted: Thu Jun 09, 2005 2:22 am Post subject: |
|
|
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 |
|
Back to top |
|
|
sdendle
Joined: 13 Jun 2005 Posts: 9
|
Posted: Mon Jun 13, 2005 5:45 pm Post subject: |
|
|
I am also looking forward to adding actions to our tests.
Any indocation on which actions will be available? |
|
Back to top |
|
|
KS-Soft
Joined: 03 Apr 2002 Posts: 12792 Location: USA
|
Posted: Tue Jun 14, 2005 10:41 am Post subject: |
|
|
I think on first stage we implement the following actions
- execute external command
- syslog
- TCP/UDP send
Regards
Alex |
|
Back to top |
|
|
KS-Soft
Joined: 03 Apr 2002 Posts: 12792 Location: USA
|
|
Back to top |
|
|
jromariz
Joined: 03 Apr 2002 Posts: 264 Location: Brasil
|
Posted: Thu Jul 07, 2005 4:55 am Post subject: |
|
|
Good news Alex!
Regards,
Jromariz. |
|
Back to top |
|
|
r3boot
Joined: 08 Jun 2005 Posts: 7
|
Posted: Thu Jul 14, 2005 1:45 am Post subject: |
|
|
Great news Alex I'll install them today and let you know the results. |
|
Back to top |
|
|
|