34. Monitoring: Why? « When I get on the homepage I have a blank page […] » « Seriously? One moment, checking […] » « We are aware of the problem, our engineers have found the solution. Everything will be back to normal in 5 minutes » « Hell! You're right!? »
56. Database event id INTEGER ts TEXT type INTEGER file TEXT line INTEGER message TEXT backtrace TEXT slow_request id INTEGER ts TEXT duration FLOAT file TEXT
124. Tag info for 1 tag Timer data grouped by the value of the specified tag. CREATE TABLE `tag_info_foo` ( `tag_value` varchar ( 32 ) DEFAULT NULL , `req_count` int ( 11 ) DEFAULT NULL , `hit_count` int ( 11 ) DEFAULT NULL , `timer_value` float DEFAULT NULL ) ENGINE =PINBA DEFAULT CHARSET =latin1 COMMENT = 'tag_info:foo'
125. Tag info for 2 tags Timer data grouped by the value of two specified tags. CREATE TABLE `tag_info_foo_bar` ( `foo_value` varchar ( 32 ) DEFAULT NULL , `bar_value` varchar ( 32 ) DEFAULT NULL , `req_count` int ( 11 ) DEFAULT NULL , `hit_count` int ( 11 ) DEFAULT NULL , `timer_value` float DEFAULT NULL ) ENGINE =PINBA DEFAULT CHARSET =latin1 COMMENT = 'tag2_info:foo,bar'
126. Tag report for 1 tag Timer data grouped by script name and value of the specified tag. CREATE TABLE `tag_report_foo` ( `script_name` varchar ( 128 ) DEFAULT NULL , `tag_value` varchar ( 32 ) DEFAULT NULL , `req_count` int ( 11 ) DEFAULT NULL , `hit_count` int ( 11 ) DEFAULT NULL , `timer_value` float DEFAULT NULL ) ENGINE =PINBA DEFAULT CHARSET =latin1 COMMENT = 'tag_report:foo'
127. Tag report for 2 tags Timer data grouped by script name and value of two specified tags. CREATE TABLE `tag_report_foo_bar` ( `script_name` varchar ( 128 ) DEFAULT NULL , `tag1_value` varchar ( 32 ) DEFAULT NULL , `tag2_value` varchar ( 32 ) DEFAULT NULL , `req_count` int ( 11 ) DEFAULT NULL , `hit_count` int ( 11 ) DEFAULT NULL , `timer_value` float DEFAULT NULL ) ENGINE =PINBA DEFAULT CHARSET =latin1 COMMENT = 'tag2_report:foo,bar'
Surveiller d'eventuellle erreur comportementale de l'application. Surveiller au niveau des performances, afin de prevoir d'eventuel probleme
Page de demo avec E_NOTICE et autre, Display avec tail
Tail -f /var/log/php/error.log Page vide de apm.php Puis generation d'une page d'erreur Affichage de apm.php Recommecer avec mutilple erreur
Rappel, qu'est ce que APC, Xdebug, … Compatbilité totale avec le monde du LL
Compatbilité totale avec le monde du LL
L'extension PHP Pinba envoie un paquet UDP lors de la terminaison d'une requête qui contient des informations comme: hostname - gethostname() result request_count - number of requests served by this process server_name script_name document_size - size of the response body memory_peak - memory allocation peak request_time - time spent of processing the request ru_utime - resource usage (user) ru_stime - resource usage (system) timers - array of timers (optional) De la nature UDP, aucune connexion n'est réalisée, ce qui permet d'avoir aucun impacte de performance, mais des pertes de paquets pourraient se produire. De l'autre coté, le plugin MySQL Pinba écoute sur le port configuré pour récupérer les paquets et les décoder afin de les stocker dans ses pools d'enregistrements ainsi que de mettre à jour les index, les rapports de bases et rapports de tags si ils existent.
Raw data tables contain raw request data (surprise!). Please bear in mind that access to the raw data is relatively slow (the number of records might reach millions and there are NO indexes except for primary keys, so almost any operation requires full table scan). Reports were created in order to speed up the most frequent operations by aggregating data on-the-fly, when new request data arrives.