[Xymon] File monitor not working in Xymon - using file list generated by wildcard

Larry Barber lebarber at gmail.com
Thu Oct 4 23:39:51 CEST 2012


Perhaps if you set up your client-local.cfg entry like:

file:`find /Volumes/MySQL_Backups/ -name '*.sql' -mtime 0 2>/dev/null |
sort -r | head --lines=1`

so that only the most recent file (by name) will be returned.

Thanks,
Larry Barber



On Thu, Oct 4, 2012 at 4:11 PM, Don Kuhlman <Don.Kuhlman at schawk.com> wrote:

>  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
>
> [image: 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
>
> [image: 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
>
> [image: 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>
> [image: 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
>
>
>
> _______________________________________________
> Xymon mailing list
> Xymon at xymon.com
> http://lists.xymon.com/mailman/listinfo/xymon
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20121004/1a5390e6/attachment.html>


More information about the Xymon mailing list