Monitor Your Business V2

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    1 Favorite

    Monitor Your Business V2 - Presentation Transcript

    1. Monitor your Business Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
    2. PHPCon Italia 2009 Who is talking? Monitor your Business Lars Jankowfsky • CTO swoodoo.com • php since php/fi • developing since 15 years Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
    3. PHPCon Italia 2009 Preface Monitor your Business • No rocket science today • using existing tools for business monitoring • nagios • cacti Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
    4. PHPCon Italia 2009 What can you expect? Monitor your Business Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
    5. PHPCon Italia 2009 What can you expect? Monitor your Business Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
    6. PHPCon Italia 2009 What can you expect? Monitor your Business Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
    7. PHPCon Italia 2009 nagios Monitor your Business nagios Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
    8. PHPCon Italia 2009 nagios Monitor your Business • popular open source network monitoring software • usually used mostly for networking/service monitoring (load,ping,mysql...) • http://www.nagios.org • http://nagios.sourceforge.net/docs/3_0/quickstart- ubuntu.html Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
    9. PHPCon Italia 2009 nagios Monitor your Business • orders (eCommerce) • imported data (webservices) • customer activity (web 2.0) •... Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
    10. PHPCon Italia 2009 nagios Monitor your Business e.g. Order tracking • we use OXID CE • http://www.oxid-esales.com/download • could be any other shopping cart (osc,magento...) shop zeigen phpmyadmin zeigen Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
    11. PHPCon Italia 2009 nagios Monitor your Business the script • /usr/local/nagios/libexec • php-cli • nagios active mode diff types - we use active (nagios calls) passive checks write into nagios command file, and later nagios reads. Asynchronous Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
    12. PHPCon Italia 2009 nagios Monitor your Business Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
    13. PHPCon Italia 2009 nagios Monitor your Business #!/usr/bin/php <?php $link = mysql_connect('localhost', 'root', 'root'); mysql_select_db('oxid', $link); $result = mysql_query(\"SELECT count(*) FROM `oxorder` WHERE date(oxorderdate) = curdate()\"); $row = mysql_fetch_array($result, MYSQL_NUM); $todayordercount = $row[0]; mysql_close($link); if ($todayordercount < 1) { echo(\"VALUE ERROR - we got $todayordercount|v=$todayordercount\"); exit(2); } elseif ($todayordercount < 5) { echo(\"VALUE WARNING - we got $todayordercount|v=$todayordercount\"); exit(1); } else { echo(\"VALUE OK - we got $todayordercount|v=$todayordercount\"); exit(0); } Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
    14. PHPCon Italia 2009 nagios Monitor your Business Plugin Return Code: • 0=OK • 1=WARNING • 2=CRITICAL • 3=UNKNOWN Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
    15. PHPCon Italia 2009 nagios Monitor your Business ../etc/objects/commands.cfg Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
    16. PHPCon Italia 2009 nagios Monitor your Business ../etc/objects/commands.cfg #Shop Orders define command{ command_name check-oxid-orders command_line $USER1$/check_oxid_orders } Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
    17. PHPCon Italia 2009 nagios Monitor your Business ../etc/objects/localhost.cfg Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
    18. PHPCon Italia 2009 nagios Monitor your Business ../etc/objects/localhost.cfg define service{ use local-service host_name localhost service_description SHOP_ORDERS check_command check-oxid-orders } Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
    19. PHPCon Italia 2009 nagios Monitor your Business Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
    20. PHPCon Italia 2009 nagios Monitor your Business Why nagios ? • automatic alerts like SMS or eMail • nearly every provider uses it • can use SNMP for remote testing • easy to setup and to configure Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
    21. PHPCon Italia 2009 cacti Monitor your Business cacti Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
    22. PHPCon Italia 2009 cacti Monitor your Business • popular open source RRD graphing tool • RRD == Round Robin Database • http://www.cacti.net • apt-get install cacti Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
    23. PHPCon Italia 2009 cacti Monitor your Business • graphs for management like: • orders, sales • conversion rates • booking/visitor rate • import/sec. rate • ... Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
    24. PHPCon Italia 2009 cacti Monitor your Business e.g. Page Impression tracking • again OXID CE • take source from table ,oxlogs‘ shop zeigen phpmyadmin zeigen Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
    25. PHPCon Italia 2009 cacti Monitor your Business /usr/local/share/cacti/scripts/test.php Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
    26. PHPCon Italia 2009 cacti Monitor your Business /usr/local/share/cacti/scripts/test.php #!/usr/bin/php <?php $link = mysql_connect('localhost', 'root', 'root'); mysql_select_db('oxid', $link); $result = mysql_query(\"SELECT count(*) FROM `oxlogs` WHERE UNIX_TIMESTAMP(oxtime) > (UNIX_TIMESTAMP() - 300)\"); $row = mysql_fetch_array($result, MYSQL_NUM); $hitsPerFiveMinutes = $row[0]; mysql_close($link); // something else $b = rand(0,10); echo(\"OK:$hitsPerFiveMinutes ERR:$b\"); Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
    27. PHPCon Italia 2009 cacti Monitor your Business is the script ok ? • amount of data... • RRD advantages Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
    28. PHPCon Italia 2009 cacti Monitor your Business #1 - create data input method Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
    29. PHPCon Italia 2009 cacti Monitor your Business #2 - add data input method fields Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
    30. PHPCon Italia 2009 cacti Monitor your Business #3 - create data template Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
    31. PHPCon Italia 2009 cacti Monitor your Business #3 - create data template Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
    32. PHPCon Italia 2009 cacti Monitor your Business #4 - add data template fields Maximum value 0 has special meaning. It means that threshold for maximum value. be sure that everything is correct. No changes possible later! Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
    33. PHPCon Italia 2009 cacti Monitor your Business #5 - create graph template... #6 - create graph template items after that add type „legend“ Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
    34. PHPCon Italia 2009 cacti Monitor your Business #6 - create graph template items Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
    35. PHPCon Italia 2009 cacti Monitor your Business #7 - create graph Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
    36. PHPCon Italia 2009 cacti Monitor your Business #7 - add into tree Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
    37. PHPCon Italia 2009 cacti Monitor your Business et voila.... Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
    38. PHPCon Italia 2009 TDD! Monitor your Business Talking about the php.... • no reason to hack! • use same source for cacti and nagios! • don‘t forget the tests... Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
    39. PHPCon Italia 2009 TDD! Monitor your Business Talking about the php.... Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
    40. PHPCon Italia 2009 That‘s it... Monitor your Business Questions ? Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
    41. PHPCon Italia 2009 That‘s it... Monitor your Business Thank you for your interest! http://joind.in/talk/view/237 Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009

    + dodgerisdodgeris, 8 months ago

    custom

    1102 views, 1 favs, 6 embeds more stats

    The most important thing happening in your website more

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 1102
      • 980 on SlideShare
      • 122 from embeds
    • Comments 0
    • Favorites 1
    • Downloads 24
    Most viewed embeds
    • 71 views on http://www.frontalaufprall.com
    • 40 views on http://www.planet-php.net
    • 5 views on http://planet-php.org
    • 4 views on http://www.planet-php.org
    • 1 views on http://lj-toys.com

    more

    All embeds
    • 71 views on http://www.frontalaufprall.com
    • 40 views on http://www.planet-php.net
    • 5 views on http://planet-php.org
    • 4 views on http://www.planet-php.org
    • 1 views on http://lj-toys.com
    • 1 views on http://www.netvibes.com

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories