Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Some Problems with cfengine...

0 views
Skip to first unread message

Faeth Markus

unread,
Feb 18, 2002, 5:56:35 AM2/18/02
to
Hello,

a part of your daily administration issue is to check the output of the
daily_check.sh scripts, sent by every server in our farm. In this
script all information about the server and processes an so on.. are written
by executing simple commands like (ps -ef, df -k, netstat -a,
ifconfig -a, ...). This mails are checked every morning and our
administrator spends a time of nealy 2 hours to do so. We hope to
reduce this time by using cfengine.
That is why I try to understand cfengine and it's configuration. Till now I
came across some problems and I hope you can help me:

->processes:
-------------------------------------
I was able to configure cfengine to check if all necessary processes are
working and to warn if not. Now a question is
how can I check for processes that are not configured... like shell
processes and so on that aren't allowed to be there?
I tried to write a complicated regular expression to do so, but it did't
work.

Another problem is that I have to check for httpd processes that are working
more than 24 hours. I thought with 'filters' it can't
be that difficult, but I couldn't manage it:

..
filters:
{ httpd
FromSTime: "accumulated(0,0,1,0,0,0)"
ToSTime: "inf"
Result: "STime"
}
..
processes:
"/usr/bin/httpd" filter=httpd action=warn
..

results in a 'Segmentation Fault'!
surely you have some experience and can help me build the right statement.


->disk:
-------------------------------------
you wrote that disks would be an synonym for required. disks ends in a parse
error and required works well. (?)
But it doesn't seem to work right anyway; my df -k:

Filesystem 1k-blocks Used Available Use%
Mounted on
/dev/hda6 4008380 354788 3449972 10% /
/dev/hda5 54384 2495 49081 5%
/boot
..
required:
/dev/hda6 freespace=100mb

results in:
..
Filesystem /dev/hda6 looks sensible
Free space above 102400, defining
..

I tried to set the sensiblesize and sensiblecount variables, but I did't
change anything.
And how can I configure cfengine to output the required errors without
verbose mode, so that
only an output appears, when really something got wrong? It does't help us
to get a another long mail, which
we have to parse manually.


->cfengine and cygwin
----------------------------------------
My test-system is a linux 7.3 OS. Now another task is to test cfengine on
NT. I read in your documentation that
you need an unix emulation like Cygwin or UWIN. So I installed Cygwin and
compiled cfengine successfully.
- Now point number one is that the process list only contains processes of
Cygwin (only bash and ps itself).
Do you know if Cygwins ps is able to get NT's processes; so that's they
can be checked by cfengine?
- I tried required:

..
required:
/cygdrive/c freespace=100mb
/cygdrive/d freespace=100mb
..

results in:
..
cfengine:*: Can't stat /cygdrive/c/pagefile.sys in required/disk
cfengine:*: lstat: Permission denied

I'm logged in as Administrator and there doesn't seem to exist a root user
under cygwin! (?)
Do you have an idea what I do wrong?


I know that this are a lot of questions at once and perhaps some silly ones,
but I'm a newby (apprentice) and
happy about every kind of information and help about this topic.


Thank you very much in advance!
Markus Faeth


Alexander Mattausch

unread,
Feb 18, 2002, 7:35:02 AM2/18/02
to
Faeth Markus wrote:

>->cfengine and cygwin
>----------------------------------------
>My test-system is a linux 7.3 OS. Now another task is to test cfengine on
>NT. I read in your documentation that
>you need an unix emulation like Cygwin or UWIN. So I installed Cygwin and
>compiled cfengine successfully.
>- Now point number one is that the process list only contains processes of
>Cygwin (only bash and ps itself).
> Do you know if Cygwins ps is able to get NT's processes; so that's they
>can be checked by cfengine?
>- I tried required:
>

>...


>required:
> /cygdrive/c freespace=100mb
> /cygdrive/d freespace=100mb

>...
>
>results in:
>...


>cfengine:*: Can't stat /cygdrive/c/pagefile.sys in required/disk
>cfengine:*: lstat: Permission denied
>
>I'm logged in as Administrator and there doesn't seem to exist a root user
>under cygwin! (?)
>Do you have an idea what I do wrong?
>

Nothing. The problem is that Administrator on NT does not have full
rights as does root under Unix. Pagefile.sys is locked by the OS, even
the Administrator may not change it on a running system. And sometimes
Windows is too restrictive...

Regards,
Alex


0 new messages