[FX.php List] Monitoring FM Server 9/10 Advance

John Funk jfunk at criticalsolution.com
Fri Feb 6 08:38:53 MST 2009


Thanks Steve.
I found out that my client wants the MYSQL type data collections where there
is an actual table for server stats. I may end up building a PHP/MySql data
collector and let his third party monitoring app read the tables. Thos IT
guys are really a pain sometimes....
Thanks for the discussion.
John Funk


On 2/5/09 5:28 PM, "Steve Winter" <steve at bluecrocodile.co.nz> wrote:

> Hi John,
> 
> Here's an example of what I do 'inline'... with the first db call that will be
> made to any particular solution...
> 
> Cheers
> Steve
> 
>   $productQuery = new FX($serverIP, $serverPort, $dataSourceType);
>   $productQuery->SetDBUserPass($webUN, $webPW);
>   $productQuery->SetDBData("schedules", "productAreas");
>   $productQuery->AddSortParam('productSortOrder', 'ascend');
>   $productQuery->AddDBParam('productAreaDisplay','no','neq');
>   $productData = $productQuery->FMFind();
>   
>   if(isset($productData) && is_array($productData) &&
> isset($productData['data'])) {
> 
> // do the regular stuff
> 
>   else {
>   $errorData = $productData;
>   include('assets/includes/errorReporter.php');
>   }
> 
> Then errorReporter.php says;
> 
> 
> //display user message
> echo '<h2>An error has occured</h2>' .
>      '<p>An error has occured conneecting to the host database. The site
> administrator has been notified. Please try your query again at a later
> time.</p>' .
>      '<p>We apologise for this inconvienience<br />The '.$siteName.' web
> team</p>';
>  
> 
>  
> 
> 
>    // send me an email
> 
>   require_once('assets/includes/phpMailer/mailer.php');
>   $staffMailer = new Mailer();
>   $staffMailer->Subject = $sitename.' site error';
>   $staffMailer->FromName = $sitename;
>   $staffMailer->From = 'database at matatirosolutions.co.uk';
>   $staffMailer->Body = '<p>The '.$sitename.' site is currently reporting an
> error</p>
> <p>The error data is '.showMe($errorData).'<p />;
>   $staffMailer->isHTML(true);
>   $staffMailer->AddAddress('steve at matatirosolutions.co.uk', 'Steve Winter');
>   if(!$staffMailer->Send()) $mailError = 'error';
>   $staffMailer->ClearAddresses();
>   $staffMailer->ClearAttachments();
> 
> On 5 Feb 2009, at 23:16, John Funk wrote:
> 
>>  Thanks Steve,
>>  I will check the email on the server part. I do not know if this gives the
>> detail my customer wants. I may end up reading the FMSA log files(s)
>>  A sample PHP script would be nice to see.
>>  Thanks again
>>  John
>>  
>>  
>>  On 2/5/09 5:03 PM, "Steve Winter" <steve at bluecrocodile.co.nz> wrote:
>>  
>>  
>>> Hi John,
>>>  
>>>  FMS itself can send automated emails when it detects any issue with the
>>> server situation...
>>>  
>>>  The other thing that I've done is to write a simple php script, which is
>>> then run on a win2k3 server scheduled task every 5 min which attempts to do
>>> a findAny() using fx on a series of database tables which should be
>>> accessible... if it fails on any of those, then that PHP script sends me an
>>> email with the name of the table in the message... I also have similar code
>>> in all of the web solutions I develop such that if a user ever attempts to
>>> connect to a db and that call fails then I get an email which tells me
>>> that...
>>>  
>>>  All of the above email go into an account which my mobile phone also
>>> monitors so that I get notification almost in real time by email and alert
>>> on my mobile...
>>>  
>>>  Hope this helps... if you want code examples let me know...
>>>  
>>>  Cheers
>>>  Steve
>>>  
>>>  
>>>  On 5 Feb 2009, at 22:56, criticalsolution at comcast.net wrote:
>>>  
>>>  
>>>> Has anybody written or used any kind of script or app to monitor FMSA 9 or
>>>> 10? My client wants a pro-acitive solution to tell tech support when there
>>>> is trouble (or not) on an FMServer. I thought that there might be some ways
>>>> to do this in FX/PHP?
>>>>  
>>>>  Thank you,
>>>>  
>>>>  John Funk
>>>>  Critical Solution
>>>>  _______________________________________________
>>>>  FX.php_List mailing list
>>>>  FX.php_List at mail.iviking.org
>>>>  http://www.iviking.org/mailman/listinfo/fx.php_list
>>>>  
>>> 
>>>   
>>>  
>>>  Steve Winter
>>>  steve at bluecrocodile.co.nz <mailto:steve at matatirosolutions.co.uk>
>>>  m: +44 77 7852 4776
>>>  3 Calshot Court, Channel Way
>>>  Ocean Village, Southampton SO14 3GR
>>>   
>>>  
>>>  
>>>  
>>> 
>>> _______________________________________________
>>>  FX.php_List mailing list
>>>  FX.php_List at mail.iviking.org
>>>  http://www.iviking.org/mailman/listinfo/fx.php_list
>>>  
>> 
>>   
>>   _______________________________________________
>> FX.php_List mailing list
>> FX.php_List at mail.iviking.org
>> http://www.iviking.org/mailman/listinfo/fx.php_list
> 
>  
> 
> Steve Winter
> steve at bluecrocodile.co.nz <mailto:steve at matatirosolutions.co.uk>
> m: +44 77 7852 4776
> 3 Calshot Court, Channel Way
> Ocean Village, Southampton SO14 3GR
>  
> 
> 
> 
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.iviking.org/pipermail/fx.php_list/attachments/20090206/bf7376e5/attachment.html


More information about the FX.php_List mailing list