Tom Scanlan wrote: > first off, i'm not really sure which services you are trying to restart. > i think what you are saying is that instead of using ssh to get into > the remote machine and execute a monitor, the ex-guru was using inetd to > execute the scripts. it is possible to use inetd in this manner. there > are a few things to do if you want to add more monitors via inetd -- i'll > add a way to check df -k on a machine by telnetting to port 600: > > in /etc/services add: > dftest 600/tcp > > in /etc/inetd.conf add: > dftest stream tcp nowait root /usr/sbin/tcpd df -k
I would suggest that you run this under user 'nobody' for added security. > now restart or HUP inetd and telnet to port 600 on that machine. you > ought to get back an exact listing of a df -k. running other services > this way can be handy, but be careful of security. you'll still have to > write mon tools to parse the output to alert you. I have a df.monitor already written which does precisely this. If anyone is interested, I can send it along. I also have a ps.monitor which monitors process sizes, CPU utilization, and checks for existence of processes or excessive numbers of processes. We monitor other things in exactly this way as well. All associated inetd entries, in our case, run under user "nobody" to minimize security-related problems. > now, the downside to writing monitors this way is that you must go down to > each machine that you want to monitor and set up each inetd service. i'm > a bit impatient, and tend to make things easier on myself. by writing the > df -k as a stand alone ssh script i save myself from having to maunaly > configure a bunch of boxes, and it is easier to put into the mon-contrib > for others to use. Setting up inetd.conf entries is a one-time shot. Using ssh is considerably more overhead, especially if you call the monitors frequently, and have more than a couple of them in inetd.conf. The inetd method is very efficient in comparison to repeated ssh calls. > i hope this helps. > > -Tom Scanlan > OpenReach, Inc. > Network Operations > > > On Wed, 3 Oct 2001, Haydn Solomon wrote: > > > Hi everyone, > > > > I_m relatively new to mon and I_m reconfiguring mon on our system since > > the previous mon _expert_ no longer works with our company. We have > > software written in house for monitoring but I would like to get mon up > > and running myself because I think it has a lot of features our in house > > software lacks. Anyway, I have been going thru the mailing lists to see > > what I can find on automatic restart of services. Basically two > > approaches were mentioned. 1. using snmp and 2. writing a script to ssh > > into the server with the failed service. However I noticed that our > > previous mon guru used the inetd service to restart the services on the > > remote machines. Does anyone out there have any experience or knowledge > > of how this works. I would appreciate any replies on this and I_m > > continuing my research on this. Thanks > > > > -- Haydn > > > > -- Steven F. Siirila Office: Lind Hall, Room 130B Internet Services E-mail: [EMAIL PROTECTED] Office of Information Technology Voice: (612) 626-0244 University of Minnesota Fax: (612) 626-7593
