Monitor your Business


Lars Jankowfsky, CTO, swoodoo GmbH
Who is talking ?
Lars Jankowfsky:


- CTO swoodoo.com
- php since php/fi
- Developer since 15 years




Lars Jankowfsky, s...
Preface

- No rocket science today
- using existing widespread tools to create
  intelligent business monitoring
- nagios
...
Nagios

- popular open source network monitoring
  software
- usually used mostly for networking/service
  monitoring ( lo...
Nagios for business monitoring


- orders (eCommerce)
- imported data (webservices)
- customer activity (web 2.0)
- ...


...
Nagios - the script

#!/usr/bin/php
<?php

$value = rand(0,100);

if ($value < 50) {
   echo(quot;VALUE WARNING - we got $...
Nagios - settings

 ../etc/objects/commands.cfg

  #TEST
  define command{
       command_name      check-php
       comma...
Nagios - the result




Lars Jankowfsky, swoodoo.com
cacti

- popular open source RRD graphing tool
- http://www.cacti.net
- apt-get install cacti




Lars Jankowfsky, swoodoo...
cacti - for business monitoring


- graphs for management e.g.
- orders, sales
- conversion rates
- booking/visitor rate
-...
cacti - the script

                               very basic example...



  /usr/local/share/cacti/scripts/test.php

   ...
cacti - configuration

#1 - create data input method




                                          advice: add suffix ‘Dat...
cacti - configuration

#2 - add data input method fields




Lars Jankowfsky, swoodoo.com
cacti - configuration

 #3 - create data template




Lars Jankowfsky, swoodoo.com
cacti - configuration
#4 - add data template fields




                                                Maximum value 0 ha...
cacti - configuration
#5 - create graph template...
#6 - create graph template items




                                 ...
cacti - configuration
#6 - create graph template items




Lars Jankowfsky, swoodoo.com
cacti - configuration
#7 - create graph




                                                make sure that
               ...
cacti - configuration
#7 - add into tree




Lars Jankowfsky, swoodoo.com
cacti - that‘s it...




Lars Jankowfsky, swoodoo.com
Talking about the php....


- no reason to hack!
- use same source for cacti and nagios!
- don‘t forget the tests...




L...
Talking about the php....




Lars Jankowfsky, swoodoo.com
Questions?




Lars Jankowfsky, swoodoo.com
Thank you for your interest!



              eMail: lars.jankowfsky@swoodoo.com




Lars Jankowfsky, swoodoo.com
Upcoming SlideShare
Loading in …5
×

Monitor Your Business

6,387 views

Published on

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

No Downloads
Views
Total views
6,387
On SlideShare
0
From Embeds
0
Number of Embeds
134
Actions
Shares
0
Downloads
115
Comments
0
Likes
3
Embeds 0
No embeds

No notes for slide

Monitor Your Business

  1. 1. Monitor your Business Lars Jankowfsky, CTO, swoodoo GmbH
  2. 2. Who is talking ? Lars Jankowfsky: - CTO swoodoo.com - php since php/fi - Developer since 15 years Lars Jankowfsky, swoodoo.com
  3. 3. Preface - No rocket science today - using existing widespread tools to create intelligent business monitoring - nagios - cacti Lars Jankowfsky, swoodoo.com
  4. 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. 5. Nagios for business monitoring - orders (eCommerce) - imported data (webservices) - customer activity (web 2.0) - ... Lars Jankowfsky, swoodoo.com
  6. 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. 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. 8. Nagios - the result Lars Jankowfsky, swoodoo.com
  9. 9. cacti - popular open source RRD graphing tool - http://www.cacti.net - apt-get install cacti Lars Jankowfsky, swoodoo.com
  10. 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. 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. 12. cacti - configuration #1 - create data input method advice: add suffix ‘Data Input Method’. Lars Jankowfsky, swoodoo.com
  13. 13. cacti - configuration #2 - add data input method fields Lars Jankowfsky, swoodoo.com
  14. 14. cacti - configuration #3 - create data template Lars Jankowfsky, swoodoo.com
  15. 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. 16. cacti - configuration #5 - create graph template... #6 - create graph template items after that add type „legend“ Lars Jankowfsky, swoodoo.com
  17. 17. cacti - configuration #6 - create graph template items Lars Jankowfsky, swoodoo.com
  18. 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. 19. cacti - configuration #7 - add into tree Lars Jankowfsky, swoodoo.com
  20. 20. cacti - that‘s it... Lars Jankowfsky, swoodoo.com
  21. 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. 22. Talking about the php.... Lars Jankowfsky, swoodoo.com
  23. 23. Questions? Lars Jankowfsky, swoodoo.com
  24. 24. Thank you for your interest! eMail: lars.jankowfsky@swoodoo.com Lars Jankowfsky, swoodoo.com

×