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
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
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