Hi
I'm trying to monitor all file (permissions) of all files in a directory viz:/var/adm.
I have the following entries in client-local.cfg
[sunos] log:/var/adm/%.*:10240 log:/var/adm/messages %ERROR|CRIT COLOR=red log:/var/adm/messages %WARNING|NOTICE COLOR=yellow IGNORE=lpr
analysis.cfg LOG %.* WARNING COLOR=yellow LOG %/var/adm/messages %(I/O|read).error COLOR=red FILE /var/adm/messages SIZE>0 MTIME<600 yellow FILE %.* MODE=644 red
It only reports on /var/adm/messages file.
What am I doing wrong?
Many thanks
Nelandran Moodley | Unix Systems Engineer | Group Technology Infrastructure | Standard Bank of South Africa | 44 Borrowdale Road | RiverClub | Sandton | RSA [cid:image001.png at 01CCC9FA.20D70070] nelandran.moodley at standardbank.co.za<mailto:Bongane.mabasa at standardbank.co.za> Office: +27 11 700 1542 Mobile: +27 82 7792059
Standard Bank email disclaimer and confidentiality note Please go to http://www.standardbank.co.za/site/homepage/emaildisclaimer.html to read our email disclaimer and confidentiality note. Kindly email disclaimer at standardbank.co.za (no content or subject line necessary) if you cannot view that page and we will email our email disclaimer and confidentiality note to you.
On 03-01-2012 08:32, Moodley, Nelandran N wrote:
I’m trying to monitor all file (permissions) of all files in a directory viz:/var/adm.
I have the following entries in client-local.cfg
[sunos] log:/var/adm/%.*:10240 log:/var/adm/messages %ERROR|CRIT COLOR=red log:/var/adm/messages %WARNING|NOTICE COLOR=yellow IGNORE=lpr
First, You should only use "log" for log-files, i.e. files where you want to have the actual contents of the files sent to Xymon for checking. If you only want to monitor file permissions, then use a "file:" definition instead.
Second, you cannot use wild-card filenames in the client-local.cfg file. As the man-page says:
"If you want to check multiple files using a wildcard, you must use a command to generate the filenames. Putting wildcards directly into the file: entry will not work."
So something like this should do the trick:
file:ls /var/adm/
Regards, Henrik
On Tue, Jan 3, 2012 at 3:09 AM, Henrik Størner <henrik at hswn.dk> wrote:
On 03-01-2012 08:32, Moodley, Nelandran N wrote:
I’m trying to monitor all file (permissions) of all files in a directory viz:/var/adm.
I have the following entries in client-local.cfg
[sunos] log:/var/adm/%.*:10240 log:/var/adm/messages %ERROR|CRIT COLOR=red log:/var/adm/messages %WARNING|NOTICE COLOR=yellow IGNORE=lpr
First, You should only use "log" for log-files, i.e. files where you want to have the actual contents of the files sent to Xymon for checking. If you only want to monitor file permissions, then use a "file:" definition instead.
Second, you cannot use wild-card filenames in the client-local.cfg file. As the man-page says:
"If you want to check multiple files using a wildcard, you must use a command to generate the filenames. Putting wildcards directly into the file: entry will not work."
So something like this should do the trick:
file:
ls /var/adm/
I was wondering - is it (or could it become) possible to enter wildcard hostnames? Something like:
[www.*.domain.com]
file:/var/log/xxx.log
with the intention that the file: and log: entries be sent to any host matching the wildcard.
Thanks,
Ralph Mitchell
participants (3)
-
henrik@hswn.dk
-
Nelandran.Moodley@standardbank.co.za
-
ralphmitchell@gmail.com