[Xymon] File monitor not working in Xymon - using file list generated by wildcard
Don Kuhlman
Don.Kuhlman at schawk.com
Thu Oct 4 23:11:31 CEST 2012
Hi folks. I've been trying to figure this out for a while and would appreciate any help.
I'm trying to monitor for a sql backup by watching for a set of files that are created every morning at 00:05 AM by a cron job on a server.
There are several files created each night the sql dump runs.
It creates them as filename_backup__yyyymmdd.sql
So each day there are new file names created (never the same name)
I want to alert if the file doesn't get created each day with the new name.
I have configured the client-local.cfg file as follows:
[MYSQLSERVER01]
# dir:`find /Volumes/MySQL_Backups/ -name '*.sql' -mtime 0 2>/dev/null`
# file:/Volumes/MySQL_Backups/mysql_backup_20121004.sql
file:`find /Volumes/MySQL_Backups/ -name '*.sql' -mtime 0 2>/dev/null`
Analysis.cfg is as follows:
HOST=MYSQLSERVER01
FILE %^.sql COLOR=red mtime<600
# FILE /Volumes/MySQL_Backups/mysql_backup_20121004.sql red mtime<600
# FILE /Volumes/MySQL_Backups/mysql_backup_20121004.sql COLOR=red mtime<600
# FILE /Volumes/MySQL_Backups/mysql_backup_20121004.sql red mtime>86400
# FILE /Volumes/MySQL_Backups/mysql_backup_20121004.sql red mtime<86400
# FILE /Volumes/MySQL_Backups/mysql_backup_20121004.sql red mtime>600
# FILE /Volumes/MySQL_Backups/mysql_backup_20121004.sql mtime>86400 noexist
Xymon generates this msg when I use the full filename – eg mysqlbackup20121004.sql in analysis.cfg
It doesn't work when I try to use a wildcard name (which I need because the filename will change each day) - eg FILE %^.sql
Example alert is below using full real filename:
Thu Oct 4 16:02:11 CDT 2012 - Files NOT ok
[red] /Volumes/MySQL_Backups/mysql_backup_20121004.sql<http://srmxymon.ambrosi.com/xymon-cgi/svcstatus.sh?CLIENT=MYSQLSERVER01&SECTION=file:/Volumes/MySQL_Backups/mysql_backup_20121004.sql>
File was modified 57134 seconds ago - should be <600
[green] /Volumes/MySQL_Backups/herbalife_backup_20121004.sql<http://srmxymon.ambrosi.com/xymon-cgi/svcstatus.sh?CLIENT=MYSQLSERVER01&SECTION=file:/Volumes/MySQL_Backups/herbalife_backup_20121004.sql>
Example below using %^.sql:
Thu Oct 4 16:10:15 CDT 2012 - Files ok
[green] /Volumes/MySQL_Backups/mysql_backup_20121004.sql<http://srmxymon.ambrosi.com/xymon-cgi/svcstatus.sh?CLIENT=MYSQLSERVER01&SECTION=file:/Volumes/MySQL_Backups/mysql_backup_20121004.sql>
[green] /Volumes/MySQL_Backups/herbalife_backup_20121004.sql<http://srmxymon.ambrosi.com/xymon-cgi/svcstatus.sh?CLIENT=MYSQLSERVER01&SECTION=file:/Volumes/MySQL_Backups/herbalife_backup_20121004.sql>
Thanks
Don K
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20121004/729e4219/attachment.html>
More information about the Xymon
mailing list