AOWiki :: AODevs Forums :: Arcanum :: AO Official Forums :: AOC US/EU Official Forums
Welcome, Guest. Please login or register.
Did you miss your activation email?
+  FC 3rd Party Dev
|-+  Anarchy Online» Releases» PHP AO Server Monitor - v0.0.3
Username:
Password:
 
Pages: [1]
  Print  
Author Topic: PHP AO Server Monitor - v0.0.3  (Read 2003 times)
Zibby
Rollerrat
*

Reetness: +0/-0
Offline Offline

Posts: 25



View Profile
« on: May 16, 2007, 07:18:54 »

Introduction
I had written a BeBot module that monitors http://probes.funcom.com/ao.xml for changes in an attempt to automate setting things such as my APF timer (web and BeBot versions). I've had it running for some time now and it seems to fairly accurately pick up AO server events, and thus server uptimes.

I decided I wanted this monitoring to be outside of the bot, and the result (so far) is this. Server events are logged to a SQLite database. I've also borrowed the get_site function from BeBot, thus you will need sockets to run the monitor.

The display is a separate PHP script that only needs SQLite.

Download
AO Server Monitor 0.0.3

Instructions:
Extract. Run AOServerMonitor.php. The contents of public_html go on your webserver, edit aosmconf.php to point to your aosm.db file. Load up http://yoursite.com/aosm.php.

It only displays No events logged. Help!
This is normal. Until FunCom resets or patches the servers, or some other outage occurs, there will be no events logged. Until FunCom resets a server, this is boring.

Keeping the monitor running
I've included a bash (or sh) shell script that is intended to be called from cron on *NIX systems. The script requires GNU screen and grep. Edit aosm.cron to match your paths, then create a crontab entry as follows:

*/15 * * * * /home/user/AOServerMonitor/aosm.cron > /dev/null

Every 15 minutes cron will run the script and restart the monitor if it is not running. Thanks to N\D for the original cron script.

Public Website
Public display is now active at http://zibby.isa-geek.net/aosm

I think that's everything, enjoy.
« Last Edit: June 28, 2007, 20:50:03 by Zibby » Logged


Glarawyn Title 7 OT Adventurer
Lilredhot Title 7 OT Enforcer
Stringtheory Title 3 OT Nano Tech
Zibby
Rollerrat
*

Reetness: +0/-0
Offline Offline

Posts: 25



View Profile
« Reply #1 on: May 16, 2007, 16:03:58 »

Posted a database containing information captured during 2007-05-16's downtime. And here I was thinking I would be able to ignore this little project for a few weeks...

aosm.db

Output has some issues that need to be corrected.
  • Typo in client manager display that is preventing proper display.
  • The monitor app is using mktime to record the unix time stamp and the display page is using gmdate to display the date...thus current data is off.

Both issues are fixed in 0.0.2 and the info in the database has been corrected. 0.0.2 also includes a starter database with today's downtime information to get your monitor started. Smiley
« Last Edit: May 16, 2007, 16:45:15 by Zibby » Logged


Glarawyn Title 7 OT Adventurer
Lilredhot Title 7 OT Enforcer
Stringtheory Title 3 OT Nano Tech
Zibby
Rollerrat
*

Reetness: +0/-0
Offline Offline

Posts: 25



View Profile
« Reply #2 on: May 16, 2007, 17:04:31 »

http://zibby.isa-geek.net/aosm/ is up for consumption...
Logged


Glarawyn Title 7 OT Adventurer
Lilredhot Title 7 OT Enforcer
Stringtheory Title 3 OT Nano Tech
Zibby
Rollerrat
*

Reetness: +0/-0
Offline Offline

Posts: 25



View Profile
« Reply #3 on: June 28, 2007, 20:49:44 »

Looked at things again and noticed that the timestamp in the probes XML provided by FunCom (http://probes.funcom.com/ao.xml) is 5 hours off.

Updated the logging script to log time() instead of the timestamp provided by the XML to the database.

Hopefully that will make this a bit more useful...
Logged


Glarawyn Title 7 OT Adventurer
Lilredhot Title 7 OT Enforcer
Stringtheory Title 3 OT Nano Tech
Pages: [1]
  Print  

 
Jump to:  

Page created in 0.035 seconds with 17 queries.