Your SlideShare is downloading. ×
Monitor Your Business
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Monitor Your Business

5,708

Published on

Published in: Technology
0 Comments
3 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
5,708
On Slideshare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
114
Comments
0
Likes
3
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Monitor your Business Lars Jankowfsky, CTO, swoodoo GmbH
  • 2. Who is talking ? Lars Jankowfsky: - CTO swoodoo.com - php since php/fi - Developer since 15 years Lars Jankowfsky, swoodoo.com
  • 3. Preface - No rocket science today - using existing widespread tools to create intelligent business monitoring - nagios - cacti Lars Jankowfsky, swoodoo.com
  • 4. Nagios - 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 - we will use it to modify some business values Lars Jankowfsky, swoodoo.com
  • 5. Nagios for business monitoring - orders (eCommerce) - imported data (webservices) - customer activity (web 2.0) - ... Lars Jankowfsky, swoodoo.com
  • 6. Nagios - the script #!/usr/bin/php <?php $value = rand(0,100); if ($value < 50) { echo(quot;VALUE WARNING - we got $value|v=$valuequot;); exit(1); } else { echo(quot;VALUE OK - we got $value|v=$valuequot;); exit(0); } diff types - we use Plugin Return Code: active (nagios calls) 0 OK passive checks write 1 WARNING into nagios command file, and later nagios reads. 2 CRITICAL Asynchronous 3 UNKNOWN Lars Jankowfsky, swoodoo.com
  • 7. Nagios - settings ../etc/objects/commands.cfg #TEST define command{ command_name check-php command_line $USER1$/check_php } ../etc/objects/localhost.cfg define service{ use local-service ; Name of service template to use host_name localhost service_description PHP check_command check-php } Lars Jankowfsky, swoodoo.com
  • 8. Nagios - the result Lars Jankowfsky, swoodoo.com
  • 9. cacti - popular open source RRD graphing tool - http://www.cacti.net - apt-get install cacti Lars Jankowfsky, swoodoo.com
  • 10. cacti - for business monitoring - graphs for management e.g. - orders, sales - conversion rates - booking/visitor rate - import/sec. rate - ... Lars Jankowfsky, swoodoo.com
  • 11. cacti - the script very basic example... /usr/local/share/cacti/scripts/test.php #!/usr/bin/php <?php // input in $argv $a = rand(0,100); $b = rand(0,100); echo(quot;OK:$a ERR:$bquot;); Lars Jankowfsky, swoodoo.com
  • 12. cacti - configuration #1 - create data input method advice: add suffix ‘Data Input Method’. Lars Jankowfsky, swoodoo.com
  • 13. cacti - configuration #2 - add data input method fields Lars Jankowfsky, swoodoo.com
  • 14. cacti - configuration #3 - create data template Lars Jankowfsky, swoodoo.com
  • 15. cacti - configuration #4 - add data template fields Maximum value 0 has special meaning. It means that threshold for maximum value. Lars Jankowfsky, swoodoo.com be sure that everything is correc No changes possible later!
  • 16. cacti - configuration #5 - create graph template... #6 - create graph template items after that add type „legend“ Lars Jankowfsky, swoodoo.com
  • 17. cacti - configuration #6 - create graph template items Lars Jankowfsky, swoodoo.com
  • 18. cacti - configuration #7 - create graph make sure that everything is correct. You can‘t change contents later - need to recreate Lars Jankowfsky, swoodoo.com
  • 19. cacti - configuration #7 - add into tree Lars Jankowfsky, swoodoo.com
  • 20. cacti - that‘s it... Lars Jankowfsky, swoodoo.com
  • 21. Talking about the php.... - no reason to hack! - use same source for cacti and nagios! - don‘t forget the tests... Lars Jankowfsky, swoodoo.com
  • 22. Talking about the php.... Lars Jankowfsky, swoodoo.com
  • 23. Questions? Lars Jankowfsky, swoodoo.com
  • 24. Thank you for your interest! eMail: lars.jankowfsky@swoodoo.com Lars Jankowfsky, swoodoo.com

×