Oct 15, 2011 2:51 PM
How to use commands in a more sophisticated way
-
Like (0)
Hi,
I am trying to accomplish a few things with commands, all of which I haven't been successful with. All on 3.2.0
GOAL 1: Keep an ssh session logged in and updating
Example: ssh root@192.168.1.1 "tail -f \/var\/log\/some_log_file"
I want the command screen to stay up and update with whats happening in that log file. but I also want the ssh session to terminate when I close the command output screen.
GOAL 2: I want some commands to only be available to certain hosts (through either templates, or anything else).
Example: have a remote reboot command through zenoss, but not for my critical systems.
GOAL 3: Run a command with user input
Explanation: simple: how can I prompt the Zenoss user to enter in a password, of a shutdown delay, or anything. Is this even possible?
I'd appreciate any tips.
Mike
As far as I know, Zenoss Core isn't designed to work that way with commands. In fact, I'm not sure I've really heard of anyone using them much... Generally it's much easier / better to just have a terminal window open to run commands in my experiance.
Now, it is OSS, so I suppose given enough interest, effort, or money, you could possibly convince a community member to write some zenpack for the above, you could develop it yourself, or you could hire a developer to do so.
--
James Pulver
Information Technology Area Supervisor
LEPP Computer Group
Cornell University
Actually, I accomplished GOAL 1, part of GOAL 2. I hold no hope for GOAL 3.
GOAL 1:
ssh -n root@${device/manageIp} "tail -f -s 0.1 \/var\/log\/some_log_file" works fine. Of course you have to have the Zenoss pub key deployed on all machines so that the root passord is not prompted.
GOAL 2: I seem to be able to add a command to a single host, but not to a template. When I do the command is only available on that one single host, so deployment of a command is painful if there are many such hosts. I am sure it's possible and I just can't find the right UI page. Or it should be...
GOAL 3: Pretty sure you are right, giving up on that one.
Follow Us On Twitter »
|
Latest from the Zenoss Blog » | Community | Products | Services Resources | Customers Partners | About Us | ||
Copyright © 2005-2011 Zenoss, Inc.
|
||||||||