Xymon Mailing List Archive search

New Hobbit "admin" Scripts

28 messages in this thread

list Stefan Freisler · Wed, 20 Dec 2006 16:26:01 +0100 ·
Hi,
i have wrote 5 CGI-Scripts for administrate Hobbit. But i need Helf 
because there are many unsolved Problems

1. A Script which can delete/rename Services or Hosts
2. A Script where you can edit your Config in Browser
3. A Script to test your hobbit-alert.cfg in two way.
        1. By using bbcm
        2. To change any Test in any Color you want
4. A Script to watch your Hobbit Server Logs in Browser
5. A Script you can view Graphs with an exact Time.

You can download it here:
http://www.fh-augsburg.de/~henk/hobbit/
and copie it in ./cgi-secure

header and footer must copied in ./server/web/ 
and your Menu should changed: (./server/www/menu_items.js)
in something like that:
...
['Administration', null, null,
                ['Find host', 'http://hobbit/hobbit-cgi/bb-findhost.sh';],
                ['Acknowledge alert', 
'http://hobbit/hobbit-seccgi/bb-ack.sh';],
                ['Enable/disable', 
'http://hobbit/hobbit-seccgi/hobbit-enadis.sh';],
                ['Edit critical systems', 
'http://hobbit/hobbit-seccgi/hobbit-nkedit.sh';],
                ['Rename/Delete', 
'http://hobbit/hobbit-seccgi/chhostservice.sh';],
                ['Edit Configs', 
'http://hobbit/hobbit-seccgi/edit_files.sh';],
                ['Test alerts', 
'http://hobbit/hobbit-seccgi/testalarm.sh';],
                ['View Hobbit-Server Logs', 
'http://hobbit/hobbit-seccgi/viewlogs.sh';],
                ['View Graph', 
'http://hobbit/hobbit-seccgi/view_graph.sh';],
        ],
...

NOW TO MY PROBLEMS:
1. How can i found out which server have which service? and that only by 
using the Filesystem because i don't use C (i use normal bashscripts)
2. How can i found which Server has which graph? (with the same Condition)

3. Bugs, Problems,....

thx a lot
Stefan

P.S. sorry for my bad English its christmas soon ;-)
list Geoff Hallford · Wed, 20 Dec 2006 15:32:11 -0500 ·
Stefan,

Don't know what the issue is but I get a 500 error on every script of yours.
Maybe they were transferred from the web server in the wrong format (ascii
vs. binary)? Not sure.

 Server error!

The server encountered an internal error and was unable to complete your
request.

Error message:
Premature end of script headers: viewlogs.sh

If you think this is a server error, please contact the
webmaster<%5bno%20address%20given%5d>.

Error 500 bigbrother <https://mail.google.com/>;
Wed Dec 20 15:27:27 2006
Apache/2.0.54 (Linux/SUSE)


On 12/20/06, user-75055581652a@xymon.invalid <
quoted from Stefan Freisler
user-75055581652a@xymon.invalid> wrote:

Hi,
i have wrote 5 CGI-Scripts for administrate Hobbit. But i need Helf
because there are many unsolved Problems

1. A Script which can delete/rename Services or Hosts
2. A Script where you can edit your Config in Browser
3. A Script to test your hobbit-alert.cfg in two way.
        1. By using bbcm
        2. To change any Test in any Color you want
4. A Script to watch your Hobbit Server Logs in Browser
5. A Script you can view Graphs with an exact Time.

You can download it here:
http://www.fh-augsburg.de/~henk/hobbit/
and copie it in ./cgi-secure

header and footer must copied in ./server/web/
and your Menu should changed: (./server/www/menu_items.js)
in something like that:
...
['Administration', null, null,
                ['Find host', 'http://hobbit/hobbit-cgi/bb-findhost.sh';],
                ['Acknowledge alert', '
http://hobbit/hobbit-seccgi/bb-ack.sh';],
                ['Enable/disable', '
http://hobbit/hobbit-seccgi/hobbit-enadis.sh';],
                ['Edit critical systems', '
http://hobbit/hobbit-seccgi/hobbit-nkedit.sh';],
                ['Rename/Delete', '
http://hobbit/hobbit-seccgi/chhostservice.sh';],
                ['Edit Configs', '
http://hobbit/hobbit-seccgi/edit_files.sh';],
                ['Test alerts', 'http://hobbit/hobbit-seccgi/testalarm.sh';
],
                ['View Hobbit-Server Logs', '
http://hobbit/hobbit-seccgi/viewlogs.sh';],
                ['View Graph', 'http://hobbit/hobbit-seccgi/view_graph.sh';
],
        ],
...

NOW TO MY PROBLEMS:
1. How can i found out which server have which service? and that only by
using the Filesystem because i don't use C (i use normal bashscripts)
2. How can i found which Server has which graph? (with the same Condition)

3. Bugs, Problems,....

thx a lot
Stefan

P.S. sorry for my bad English its christmas

<http://dict.leo.org/ende?lp=ende&p=/gQPU.&search=Christmas>soon ;-)

-- 
'If my answers frighten you then you should cease asking scary questions.'
--Sam Jackson from Pulp Fiction
list Martin Flemming · Wed, 20 Dec 2006 21:49:00 +0100 (CET) ·
Me too ...

Apache/2.0.52 (Red Hat) Server
Scientific Linux SL release 4.3 (Beryllium)
hobbit-4.2.0

sorry,
        Martin

Martin Flemming
DESY / IT          office : Building 2b / 008a
Notkestr. 85       phone  : XXX - XXXX - XXXX
22603 Hamburg      mail   : user-f286aaa49a76@xymon.invalid
quoted from Geoff Hallford


On Wed, 20 Dec 2006, Geoff Hallford wrote:
Stefan,

Don't know what the issue is but I get a 500 error on every script of yours.
Maybe they were transferred from the web server in the wrong format (ascii
vs. binary)? Not sure.

Server error!

The server encountered an internal error and was unable to complete your
request.

Error message:
Premature end of script headers: viewlogs.sh

If you think this is a server error, please contact the
webmaster<%5bno%20address%20given%5d>.

Error 500 bigbrother <https://mail.google.com/>;
Wed Dec 20 15:27:27 2006
Apache/2.0.54 (Linux/SUSE)


On 12/20/06, user-75055581652a@xymon.invalid <
user-75055581652a@xymon.invalid> wrote:

Hi,
i have wrote 5 CGI-Scripts for administrate Hobbit. But i need Helf
because there are many unsolved Problems

1. A Script which can delete/rename Services or Hosts
2. A Script where you can edit your Config in Browser
3. A Script to test your hobbit-alert.cfg in two way.
        1. By using bbcm
        2. To change any Test in any Color you want
4. A Script to watch your Hobbit Server Logs in Browser
5. A Script you can view Graphs with an exact Time.

You can download it here:
http://www.fh-augsburg.de/~henk/hobbit/
and copie it in ./cgi-secure

header and footer must copied in ./server/web/
and your Menu should changed: (./server/www/menu_items.js)
in something like that:
...
['Administration', null, null,
                ['Find host', 'http://hobbit/hobbit-cgi/bb-findhost.sh';],
                ['Acknowledge alert', '
http://hobbit/hobbit-seccgi/bb-ack.sh';],
                ['Enable/disable', '
http://hobbit/hobbit-seccgi/hobbit-enadis.sh';],
                ['Edit critical systems', '
http://hobbit/hobbit-seccgi/hobbit-nkedit.sh';],
                ['Rename/Delete', '
http://hobbit/hobbit-seccgi/chhostservice.sh';],
                ['Edit Configs', '
http://hobbit/hobbit-seccgi/edit_files.sh';],
                ['Test alerts', 'http://hobbit/hobbit-seccgi/testalarm.sh';
],
                ['View Hobbit-Server Logs', '
http://hobbit/hobbit-seccgi/viewlogs.sh';],
                ['View Graph', 'http://hobbit/hobbit-seccgi/view_graph.sh';
],
        ],
...

NOW TO MY PROBLEMS:
1. How can i found out which server have which service? and that only by
using the Filesystem because i don't use C (i use normal bashscripts)
2. How can i found which Server has which graph? (with the same Condition)

3. Bugs, Problems,....

thx a lot
Stefan

P.S. sorry for my bad English its christmas
<http://dict.leo.org/ende?lp=ende&p=/gQPU.&search=Christmas>soon ;-)

-- 
'If my answers frighten you then you should cease asking scary questions.'
--Sam Jackson from Pulp Fiction
list Stefan Freisler · Thu, 21 Dec 2006 08:29:23 +0100 ·
Hi,
for my tests i know 2 Situatins, which was cause of this errors.
1. your rights was net set to 755 (rwx,rx,rx). You must know that this script will started by the Webserver (and his users) and not directly by hobbit!
2. Somewhere in the Script is an output before i send the Header of the file.

I have updated my Scripts, and set the header near the beginning of the script.

thx for testing. 
mfg
Stefan
list Stefan Freisler · Thu, 21 Dec 2006 08:30:41 +0100 ·
quoted from Stefan Freisler
Hi,
for my tests i know 2 Situatins, which was cause of this errors.
1. your rights was net set to 755 (rwx,rx,rx). You must know that this script will started by the Webserver (and his users) and not directly by hobbit!
2. Somewhere in the Script is an output before i send the Header of the file.

I have updated my Scripts, and set the header near the beginning of the script.

thx for testing. 
mfg
Stefan

P.S. Auf Deutsch gehts doch einfacher ;-). Ansonsten gefällt dir die Idee? Was würdest du sonst noch brauchen?
list Michael Nemeth · Thu, 21 Dec 2006 07:33:09 -0500 ·
Yes an in correct transfer ; for all the scripts have ^M  at the end of the line.
Thats easy enoght to fix after down load though.

What shell are you using its not sh (bourne)  is it realy bash ?
I  cant get the select statment in  viewlogs.sh  to work.  Look like no vaule is parsed.
I hard coded a log in and it displays.  I  put an echo "$SELECT" and it blank.

-- 
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|     _p_       Mike Nemeth
|  ___| |_____  email(w) user-609d3fab5b2d@xymon.invalid Work: XXX XXX-XXXX          |><___________)          |               Home Page:http://www.geocities.com/mjnemeth/
|               Work Page:http://scorpion/~nemethm/ |               Work Page:http://ortfsb/~mnemeth/ |++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
list Stefan Freisler · Thu, 21 Dec 2006 13:51:14 +0100 ·
HI,
thx for your test and i will fix it if i can but i need your help because 
i have only one System where i can check cgi scripts

can you change this:

#Check Query
this_cgiascii "$query"
this_getQuery "$query" "select";SELECT="$RETURN"

in

echo "<pre>$query</pre><br>------<br>"
this_cgiascii "$query"
echo "<pre>$query</pre><br>------<br>"
this_getQuery "$query" "select";SELECT="$RETURN"
echo "<pre>$query</pre><br>------<br>"

and post the output. I have tried to create my own bash functions but i 
don't know if it is real sh because many sources are not available.

mfg
Stefan
list Michael Nemeth · Thu, 21 Dec 2006 08:26:47 -0500 ·
usage: head [-n #] [-#] [filename...]


    query=$( $HEAD --bytes="$CONTENT_LENGTH" )
--bytes  is NOT a standard head  looks like gnu.
quoted from Michael Nemeth

-- 
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|     _p_       Mike Nemeth
|  ___| |_____  email(w) user-609d3fab5b2d@xymon.invalid Work: XXX XXX-XXXX          |><___________)          |               Home Page:http://www.geocities.com/mjnemeth/
|               Work Page:http://scorpion/~nemethm/ |               Work Page:http://ortfsb/~mnemeth/ |++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
list Michael Nemeth · Thu, 21 Dec 2006 09:19:23 -0500 ·
And  $GREP -oE   will not work.  I bet the sed fails too!
quoted from Michael Nemeth

-- 
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|     _p_       Mike Nemeth
|  ___| |_____  email(w) user-609d3fab5b2d@xymon.invalid Work: XXX XXX-XXXX          |><___________)          |               Home Page:http://www.geocities.com/mjnemeth/
|               Work Page:http://scorpion/~nemethm/ |               Work Page:http://ortfsb/~mnemeth/ |++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
list Stefan Freisler · Thu, 21 Dec 2006 15:26:33 +0100 ·
Hi,
hmm we have nearly the same Linux running but yours seems to have an other version of "head". I think i have an other solution to handle this Problem

change
query=$( $HEAD --bytes="$CONTENT_LENGTH" )

in
read -n $CONTENT_LENGTH query

on my styem both version running good but eventually is the 2. version more compatible.

thx
Stefan


Michael Nemeth <user-609d3fab5b2d@xymon.invalid> 21.12.2006 14:27
Bitte antworten an
user-ae9b8668bcde@xymon.invalid


An
hobbit <user-ae9b8668bcde@xymon.invalid>
Kopie

Thema
Re: [hobbit] New Hobbit "admin" Scripts
quoted from Michael Nemeth


usage: head [-n #] [-#] [filename...]


    query=$( $HEAD --bytes="$CONTENT_LENGTH" )
--bytes  is NOT a standard head  looks like gnu.

-- 
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|     _p_       Mike Nemeth

|  ___| |_____  email(w) user-609d3fab5b2d@xymon.invalid Work: XXX XXX-XXXX  |><___________)          |               Home Page:
http://www.geocities.com/mjnemeth/
|               Work Page:http://scorpion/~nemethm/ |               Work Page:http://ortfsb/~mnemeth/ |++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
list Stefan Freisler · Thu, 21 Dec 2006 15:41:36 +0100 ·
Hi,
firstly thx for your help.

are you shure your hobbit-server.cfg can be read because the Informations of the command are stored there (normaly). 
so you can use this function if grep not works
this_getQuery()
{
        RETURN=`echo "$1" | $SED -n "s/^.*$2=\([^&]*\).*\$/\1/p" | $SED "s/%0D//g"| $SED "s/%0A/\n/g" | $CUT -f 2 -d "=" | $SED "s/%3D/=/g"`
}

what i can do when sed not works too,... hmm i don't know yet but i will find an solution

stay patient ;-)

mfg
Stefan


Michael Nemeth <user-609d3fab5b2d@xymon.invalid> 21.12.2006 15:20
quoted from Stefan Freisler
Bitte antworten an
user-ae9b8668bcde@xymon.invalid


An
hobbit <user-ae9b8668bcde@xymon.invalid>
Kopie

Thema
Re: [hobbit] New Hobbit "admin" Scripts


And  $GREP -oE   will not work.  I bet the sed fails too!

-- 
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|     _p_       Mike Nemeth
|  ___| |_____  email(w) user-609d3fab5b2d@xymon.invalid Work: XXX XXX-XXXX  |><___________)          |               Home Page:
http://www.geocities.com/mjnemeth/
|               Work Page:http://scorpion/~nemethm/ |               Work Page:http://ortfsb/~mnemeth/ |++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
list Michael Nemeth · Thu, 21 Dec 2006 10:45:11 -0500 ·
Maybe that because Im un on a UNIX system not linux.  Did see any mesion of linux. 
quoted from Stefan Freisler
-- 
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|     _p_       Mike Nemeth
|  ___| |_____  email(w) user-609d3fab5b2d@xymon.invalid Work: XXX XXX-XXXX          |><___________)          |               Home Page:http://www.geocities.com/mjnemeth/
|               Work Page:http://scorpion/~nemethm/ |               Work Page:http://ortfsb/~mnemeth/ |++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
list Stefan Freisler · Thu, 21 Dec 2006 16:54:13 +0100 ·
ah ok but sed and grep are on the most Unix Systems too. 
I think i must do an switch between the Systems. The option of each programm differs extremely (but i only have Sun mashines here as an other Unix, but not tested yet).

I will work on that after the christmass day, what system do you use?

I read Redhat but it seems to be not right ;-)

thx Stefan
list Michael Nemeth · Thu, 21 Dec 2006 11:57:27 -0500 ·
Yes,  but most unix es don't spport those flags for head and grep !  I didn't  check on the sed.
IM on a Solaris 8 system

I read gnu man page for grep and didn't even understand what the -o flag did and not im not sure  egrep would do the extend regular  exp.

If I did I might try to do it another way.
.


  Antwort: Re: [hobbit] New Hobbit "admin" Scripts


    * To: user-ae9b8668bcde@xymon.invalid
    * Subject: Antwort: Re: [hobbit] New Hobbit "admin" Scripts
    * From: user-75055581652a@xymon.invalid
    * Date: Thu, 21 Dec 2006 16:54:13 +0100
quoted from Stefan Freisler


ah ok but sed and grep are on the most Unix Systems too. 
I think i must do an switch between the Systems. The option of each programm differs extremely (but i only have Sun mashines here as an other Unix, but not tested yet).

I will work on that after the christmass day, what system do you use?

I read Redhat but it seems to be not right ;-)

thx Stefan

-- 
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|     _p_       Mike Nemeth
|  ___| |_____  email(w) user-609d3fab5b2d@xymon.invalid Work: XXX XXX-XXXX          |><___________)          |               Home Page:http://www.geocities.com/mjnemeth/
|               Work Page:http://scorpion/~nemethm/ |               Work Page:http://ortfsb/~mnemeth/ |++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
list Michael Nemeth · Fri, 22 Dec 2006 09:03:43 -0500 ·
OK I got it to work.
Changed :
this_getQuery()
{
#       RETURN=`echo "$1" | $GREP -oE "(^|[?&])$2=[^&]+" | $SED "s/%0D//g"| $SED "s/%0A/\n/g"
| $CUT -f 2 -d "=" | $SED "s/%3D/=/g"`
 RETURN=`echo "$1" |   awk -F\= '{print $2}' | $SED "s/%3D/=/g"`
}
What are you trying to do with  all the grep and sed?

BTW is almost always better (more portable?) to use awk -F rather than cut -f
cut is "white space challenged  "  on many systems

Also it Bash level dependent!
Works: GNU bash, version 2.05.0(1)-release (sparc-sun-solaris2.8)
Does work:GNU bash, version 2.03.0(1)-release (sparc-sun-solaris)
quoted from Michael Nemeth


-- 
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|     _p_       Mike Nemeth
|  ___| |_____  email(w) user-609d3fab5b2d@xymon.invalid Work: XXX XXX-XXXX          |><___________)          |               Home Page:http://www.geocities.com/mjnemeth/
|               Work Page:http://scorpion/~nemethm/ |               Work Page:http://ortfsb/~mnemeth/ |++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
list Stefan Freisler · Wed, 27 Dec 2006 09:39:57 +0100 ·
Hi,
thx for your work!

But on your solution there is one Problem, becouse it only work if you have only 1 variable to send in most of this scripts i used more. I have used this solution without cut, awk, grep i hope it works. You can download it heer:

http://www.fh-augsburg.de/~henk/hobbit/

it is Version 0.0.7 with this change.

this_getQuery()
{
        RETURN=`echo "$1" | $SED -n "s/^.*$2=\([^&]*\).*\$/\1/p" | $SED "s/%0D//g"| $SED "s/%0A/\n/g" | $SED "s/%3D/=/g"` }

The many sed is needing because cgi converts some Characters in "%ASCI" and noone have given me an small solution, so i reconvert every Ascii value manually. Its not beatyfull but it works (i hope so ;-) )

I hope i could help you
Stefan
list Martin Flemming · Wed, 27 Dec 2006 11:03:38 +0100 (CET) ·
Hi, Stefan !


Thanks, now it works .... 
Great !

Cheers & have a happy new year 
signature
        Martin


Martin Flemming
DESY / IT          office : Building 2b / 008a
Notkestr. 85       phone  : XXX - XXXX - XXXX
22603 Hamburg      mail   : user-f286aaa49a76@xymon.invalid


quoted from Stefan Freisler
On Wed, 27 Dec 2006, user-75055581652a@xymon.invalid wrote:
Hi,
thx for your work!

But on your solution there is one Problem, becouse it only work if you have only 1 variable to send in most of this scripts i used more. I have used this solution without cut, awk, grep i hope it works. You can download it heer:

http://www.fh-augsburg.de/~henk/hobbit/

it is Version 0.0.7 with this change.

this_getQuery()
{
        RETURN=`echo "$1" | $SED -n "s/^.*$2=\([^&]*\).*\$/\1/p" | $SED "s/%0D//g"| $SED "s/%0A/\n/g" | $SED "s/%3D/=/g"` }

The many sed is needing because cgi converts some Characters in "%ASCI" and noone have given me an small solution, so i reconvert every Ascii value manually. Its not beatyfull but it works (i hope so ;-) )

I hope i could help you
Stefan
list Michael Nemeth · Wed, 03 Jan 2007 08:58:38 -0500 ·
IM back from vacation !  Yes the new viewlogs.sh script works with two minor problems.
ON solaris 8  you must /usr/xpg4/bin/tail  rather than the  default tail to support the -n option.
Probably true for all Solaris versions.
And the default bash from sun does not work:
 /usr/bin/bash --version
GNU bash, version 2.03.0(1)-release (sparc-sun-solaris)
Copyright 1998 Free Software Foundation, Inc.
But this version does:
$ /usr/local/bin/bash --version
GNU bash, version 2.05.0(1)-release (sparc-sun-solaris2.8)
Copyright 2000 Free Software Foundation, Inc.

I think the easiest thing is just to put a note in  the file.

ON to the next one!:

view_graph.sh

Not giving a drop down list for Service.
All in one line.
quoted from Michael Nemeth


-- 
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|     _p_       Mike Nemeth
|  ___| |_____  email(w) user-609d3fab5b2d@xymon.invalid Work: XXX XXX-XXXX          |><___________)          |               Home Page:http://www.geocities.com/mjnemeth/
|               Work Page:http://scorpion/~nemethm/ |               Work Page:http://ortfsb/~mnemeth/ |++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
list Michael Nemeth · Wed, 03 Jan 2007 09:34:33 -0500 ·
OK I fix the view_graph.sh

#    query=$( $HEAD --bytes="$CONTENT_LENGTH" )
        read -n $CONTENT_LENGTH query
 
#GRAPH1=`echo "$GRAPHS" | $SED "s/,/\n/g"`
GRAPH1=`echo "$GRAPHS" | $SED "s/,/ /g"
                                                                   
Where the , is replaced with a space

AND the right bash vesion
quoted from Michael Nemeth

-- 
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|     _p_       Mike Nemeth
|  ___| |_____  email(w) user-609d3fab5b2d@xymon.invalid Work: XXX XXX-XXXX          
|><___________)          |               Home Page:http://www.geocities.com/mjnemeth/
|               Work Page:http://scorpion/~nemethm/ 
|               Work Page:http://ortfsb/~mnemeth/ 
|++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
list Stefan Freisler · Wed, 3 Jan 2007 16:59:44 +0100 ·
Thx for help i will do it tomorrow. I have some other things fixed and 
improved (Calender to select the Time)

mfg
Stefan
list Trent Melcher · Wed, 3 Jan 2007 11:12:38 -0600 ·
Stefan
 
Why wont your script for editing the config files work with the
hobbit-clients.cfg file?
 
Trent
 

Trent Melcher
Unix/Linux Systems Administrator
Securities America Financial Corporation
(XXX) XXX-XXXX x2774
user-a7d23e07dd5c@xymon.invalid 

Securities America, Inc., a Registered Broker/Dealer, Member NASD/SIPC.
Advisory services offered through Securities America Advisors, Inc., an
SEC Registered Investment Advisory

The text of this communication is confidential, and use by any person
who is not the intended recipient is prohibited.  Any person who
receives this communication in error is requested to immediately destroy
the text of this communication without copying or further dissemination.
Your cooperation is appreciated.

 
	From: user-75055581652a@xymon.invalid
[mailto:user-75055581652a@xymon.invalid] 
	Sent: Wednesday, January 03, 2007 10:00 AM
	To: user-ae9b8668bcde@xymon.invalid
	Subject: [hobbit] Antwort: [hobbit] RE :Antwort: Re: [hobbit]
quoted from Stefan Freisler
New Hobbit "admin" Scripts
	
	
	Thx for help i will do it tomorrow. I have some other things
fixed and improved (Calender to select the Time) 
	
	mfg 
	Stefan
list Richard Leon · Wed, 3 Jan 2007 15:39:06 -0600 ·
Is there a way to configure an alert to go out per filesystem or per
process?

 
Thanks
Richard
list Trent Melcher · Wed, 3 Jan 2007 15:43:01 -0600 ·
Look at the GROUP tag.  Works very well.
quoted from Trent Melcher
 

Trent Melcher
Unix/Linux Systems Administrator
Securities America Financial Corporation
(XXX) XXX-XXXX x2774
user-a7d23e07dd5c@xymon.invalid 

Securities America, Inc., a Registered Broker/Dealer, Member NASD/SIPC.
Advisory services offered through Securities America Advisors, Inc., an
SEC Registered Investment Advisory

The text of this communication is confidential, and use by any person
who is not the intended recipient is prohibited.  Any person who
receives this communication in error is requested to immediately destroy
the text of this communication without copying or further dissemination.
Your cooperation is appreciated.

 
	From: Richard Leon [mailto:user-a4b45fb5dd94@xymon.invalid] 
	Sent: Wednesday, January 03, 2007 3:39 PM
	To: user-ae9b8668bcde@xymon.invalid
	Subject: [hobbit] Alert Per Filesystem Or Process
	
	
		Is there a way to configure an alert to go out per
filesystem or per process?

		 
		Thanks
		Richard
list Henrik Størner · Wed, 3 Jan 2007 22:45:26 +0100 ·
quoted from Richard Leon
On Wed, Jan 03, 2007 at 03:39:06PM -0600, Richard Leon wrote:
Is there a way to configure an alert to go out per filesystem or per
process?
In hobbit-clients.cfg:

   DISK /home 80 90 GROUP=useradmins
   PROC vpnd GROUP=network

and in hobbit-alerts.cfg

   GROUP=useradmins
       MAIL user-60a3120cd899@xymon.invalid

   GROUP=network
       MAIL user-da1bd1546c07@xymon.invalid


Henrik
list Richard Leon · Wed, 3 Jan 2007 16:11:17 -0600 ·

In your example below.

Useradmins group will get a page for only /home.

But what if I want the unix admins who have a rule in the hobbit-alerts that
sends SMS for all disk reds, not to be paged via sms if that filesystem goes
red. 

It would be nice if it just sends an email but if I can just get it to
ignore a page at a filesystem level I can just add the email address to the
user admins group.

Hope that made sense.

Richard
quoted from Henrik Størner

-----Original Message-----
From: Henrik Stoerner [mailto:user-ce4a2c883f75@xymon.invalid] 
Sent: Wednesday, January 03, 2007 3:45 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: Re: [hobbit] Alert Per Filesystem Or Process

On Wed, Jan 03, 2007 at 03:39:06PM -0600, Richard Leon wrote:
Is there a way to configure an alert to go out per filesystem or per
process?
In hobbit-clients.cfg:

   DISK /home 80 90 GROUP=useradmins
   PROC vpnd GROUP=network

and in hobbit-alerts.cfg

   GROUP=useradmins
       MAIL user-60a3120cd899@xymon.invalid

   GROUP=network
       MAIL user-da1bd1546c07@xymon.invalid


Henrik
list Stefan Freisler · Thu, 4 Jan 2007 10:18:48 +0100 ·
Hi,
do you have set the rights for hobbit-client.cfg?
It needed write permissions for  the Webserver, because it runs as an CGI 
script and not as the user you run hobbit.
But i look against over my code eventuelly there was a bug, do you have an 
idea why it not work?

thx for help
Stefan
list Richard Leon · Thu, 4 Jan 2007 06:39:28 -0600 ·
I searched the archive and found a few posts about monitoring nfs mounts.

But how can I ignore nfs mounts from showing up?

 
Weekly ignite backups mount a filesystem and unmount it. 

I would like to ignore this filesystem on the clients but have it monitored
on the server. 

 
How can I go about this?

 
And also how can I delete the extra chart that it created today.

 
For now I just set the default higher so it would not page out.

 
Thanks

Richard
list Pierre Malenfant · Thu, 04 Jan 2007 08:36:45 -0500 ·
Hello,

I have tried different recommendations from the mailing list and I played around with different ways of ignoring some mount types.

There is two problems I always had:
- NFS/CIFS/SMB mounts hang/delay the "df" command if remote host does not respond
- Special devices should be ignored (CD/DVD/etc)

Now, I'm using the following method and as of now, it look like it work very well for me (mostly AIX or Linux environments)

*** If somebody has other ideas or think this could be done in a simpler ways, I would be glad to hear your comments.  ***

My actual "method" if to catch only some vfs types from the "mount" command and pass the filesystem list to "df"

In the file  /home/hobbit/client/bin/hobbitclient-aix.sh

################################################################################
# Change to remove NFS and CIFS filesystems
#df -Ik | sed -e '/^[^  ][^     ]*$/{
df -Ik `mount | awk '$3~/jfs/ {printf $2 " "}'` | sed -e '/^[^  ][^ ]*$/{
################################################################################


Pierre


Richard Leon <user-a4b45fb5dd94@xymon.invalid> 2007-01-04 07:39
Please respond to
user-ae9b8668bcde@xymon.invalid


To
user-ae9b8668bcde@xymon.invalid
cc

Subject
[hobbit] Ignore NFS
quoted from Richard Leon


I searched the archive and found a few posts about monitoring nfs mounts.
But how can I ignore nfs mounts from showing up?
 Weekly ignite backups mount a filesystem and unmount it. I would like to ignore this filesystem on the clients but have it monitored on the server.  How can I go about this?
 And also how can I delete the extra chart that it created today.
 For now I just set the default higher so it would not page out.
 Thanks
Richard