<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif; ">
<div>Hi folks. I've been trying to figure this out for a while and would appreciate any help.</div>
<div><br>
</div>
<div>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.</div>
<div>There are several files created each night the sql dump runs.</div>
<div>It creates them as filename_<span style="font-style: italic">backup__yyyymmdd.sql</span></div>
<div>So each day there are new file names created (never the same name)</div>
<div>I want to alert if the file doesn't get created each day with the new name.</div>
<div><br>
</div>
<div>I have configured the client-local.cfg file as follows:</div>
<div>
<div>[MYSQLSERVER01]</div>
<div># dir:`find /Volumes/MySQL_Backups/ -name '*.sql' -mtime 0 2>/dev/null`</div>
<div># file:/Volumes/MySQL_Backups/mysql_backup_20121004.sql</div>
<div>file:`find /Volumes/MySQL_Backups/ -name '*.sql' -mtime 0 2>/dev/null`</div>
<div><br>
</div>
</div>
<div>Analysis.cfg is as follows:</div>
<div>
<div>HOST=MYSQLSERVER01</div>
<div>FILE %^.sql COLOR=red mtime<600</div>
<div># FILE /Volumes/MySQL_Backups/mysql_backup_20121004.sql red mtime<600</div>
<div># FILE /Volumes/MySQL_Backups/mysql_backup_20121004.sql COLOR=red mtime<600</div>
<div># FILE /Volumes/MySQL_Backups/mysql_backup_20121004.sql red mtime>86400</div>
<div># FILE /Volumes/MySQL_Backups/mysql_backup_20121004.sql red mtime<86400</div>
<div># FILE /Volumes/MySQL_Backups/mysql_backup_20121004.sql red mtime>600</div>
<div># FILE /Volumes/MySQL_Backups/mysql_backup_20121004.sql mtime>86400 noexist</div>
<div><br>
</div>
<div>Xymon generates this msg when I use the full filename – eg mysql<span style="font-style: italic">backup</span>20121004.sql in analysis.cfg</div>
<div>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</div>
<div><br>
</div>
<div>Example alert is below using full real filename:</div>
<center>
<form action="/xymon-cgi/history.sh"></form>
</center>
<center>
<table summary="Detail Status" align="CENTER" border="0">
<tbody>
<tr>
<td align="LEFT">
<h3>Thu Oct 4 16:02:11 CDT 2012 - Files NOT ok</h3>
<pre><img src="http://srmxymon.ambrosi.com/xymon/gifs/red.gif" alt="red" height="16" border="0" width="16"> <a href="http://srmxymon.ambrosi.com/xymon-cgi/svcstatus.sh?CLIENT=MYSQLSERVER01&SECTION=file:/Volumes/MySQL_Backups/mysql_backup_20121004.sql">/Volumes/MySQL_Backups/mysql_backup_20121004.sql</a>
File was modified 57134 seconds ago - should be <600


<img src="http://srmxymon.ambrosi.com/xymon/gifs/green.gif" alt="green" height="16" border="0" width="16"> <a href="http://srmxymon.ambrosi.com/xymon-cgi/svcstatus.sh?CLIENT=MYSQLSERVER01&SECTION=file:/Volumes/MySQL_Backups/herbalife_backup_20121004.sql">/Volumes/MySQL_Backups/herbalife_backup_20121004.sql</a>
<br></pre>
<pre><br></pre>
<pre>Example below using %^.sql:</pre>
<pre><h3> Thu Oct  4 16:10:15 CDT 2012 - Files ok</h3>
<pre><img src="http://srmxymon.ambrosi.com/xymon/gifs/green.gif" alt="green" height="16" border="0" width="16"> <a href="http://srmxymon.ambrosi.com/xymon-cgi/svcstatus.sh?CLIENT=MYSQLSERVER01&SECTION=file:/Volumes/MySQL_Backups/mysql_backup_20121004.sql">/Volumes/MySQL_Backups/mysql_backup_20121004.sql</a>

<img src="http://srmxymon.ambrosi.com/xymon/gifs/green.gif" alt="green" height="16" border="0" width="16"> <a href="http://srmxymon.ambrosi.com/xymon-cgi/svcstatus.sh?CLIENT=MYSQLSERVER01&SECTION=file:/Volumes/MySQL_Backups/herbalife_backup_20121004.sql">/Volumes/MySQL_Backups/herbalife_backup_20121004.sql</a>


</pre><pre>Thanks</pre><pre><br></pre><pre>Don K</pre><pre><br></pre></pre>
</td>
</tr>
</tbody>
</table>
</center>
</div>
</body>
</html>