<br><font size=2><tt>op5-users-bounces@lists.op5.com wrote on 31/08/2009
17:04:24:<br>
&gt; nicolas.raspail@bnpparibas.com wrote:<br>
&gt; &gt; p5-users-bounces@lists.op5.com wrote on 31/08/2009 10:38:27:<br>
&gt; &gt; <br>
&gt; &gt;&gt; nicolas.raspail@bnpparibas.com wrote:</tt></font>
<br><font size=2><tt><br>
&lt;snip&gt;</tt></font>
<br><font size=2><tt><br>
&gt; &gt; <br>
&gt; &gt; I have just installed the 0.6.2-beta10 version of merlind. At
this <br>
&gt; &gt; subject, is<br>
&gt; &gt; there a place where we can find the running version ?<br>
&gt; <br>
&gt; Well, yes and no. If you're building from git, you should be able
to<br>
&gt; see the exact version in the logs when Merlin is loaded. I just noticed<br>
&gt; that there was a bug in the gen-version.sh script that caused it to
not<br>
&gt; print the DEF_VER variable properly when building from tarballs.<br>
&gt; </tt></font>
<br>
<br><font size=2><tt>I can't access the git repository beacause of firewalls
and proxies. So</tt></font>
<br><font size=2><tt>I grab the tarball from your web interface :)</tt></font>
<br><font size=2><tt><br>
&gt; &gt; I see nothing in the <br>
&gt; &gt; logs<br>
&gt; &gt; of nagios or merlind. And in the source, in the file gen-version.sh,
there <br>
&gt; &gt; is<br>
&gt; &gt; only DEF_VER=v0.6.1 and this script seems to do nothing<br>
&gt; &gt; <br>
&gt; <br>
&gt; You're not meant to run the script manually. It's run by invoking<br>
&gt; 'make', and it's supposed to create a file called version.c<br>
&gt; </tt></font>
<br><font size=2><tt>&gt; &gt; [merlin@eqd-nagios01 merlin]$ ./gen-version.sh
<br>
&gt; &gt; #include &quot;shared.h&quot;<br>
&gt; &gt; const char *merlin_version = &quot;&quot;;<br>
&gt; &gt; <br>
&gt; &gt; But let's to why I have installed the new &nbsp;version : the
lost of mysql <br>
&gt; &gt; connection !<br>
&gt; &gt; <br>
&gt; <br>
&gt; Right. I *think* I may have fixed this one, although a mismerge between<br>
&gt; the upstream Nagios core and some of our own patches forced me to<br>
&gt; redirect my efforts a while.</tt></font>
<br>
<br><font size=2><tt>ok</tt></font>
<br><font size=2><tt><br>
&gt; <br>
&gt; &gt; ** After I switch over my MySQL server, I can see that in the
log a lot of <br>
&gt; &gt; message like that :<br>
&gt; &gt; <br>
&gt; &gt; [1251728254] 6: dbi_conn_query_null(): Failed to run [UPDATE
<br>
&gt; &gt; merlindb.service SET initial_state = 0, flap_detection_enabled
= 1, <br>
&gt; &gt; low_flap_threshold = 0.000000, high_flap_threshold <br>
&gt; &gt; = 0.000000, check_freshness = 0, freshness_threshold = 0, <br>
&gt; &gt; process_performance_data = 1, active_checks_enabled = 1, <br>
&gt; &gt; passive_checks_enabled = 1, event_handler_enabled = 1, obsess_ove<br>
&gt; &gt; r_service = 1251669600, problem_has_been_acknowledged = 0, <br>
&gt; &gt; acknowledgement_type = 0, check_type = 0, current_state = 0,
last_state = <br>
&gt; &gt; 0, last_hard_state = 0, state_type = 1, current<br>
&gt; &gt; _attempt = 1, current_event_id = 0, last_event_id = 0, current_problem_id
<br>
&gt; &gt; = 0, last_problem_id = 0, latency = 0.032000, execution_time
= 0.044196, <br>
&gt; &gt; notifications_enabled = 1, last_n<br>
&gt; &gt; otification = 0, next_check = 1251729152, should_be_scheduled
= 1, <br>
&gt; &gt; last_check = 1251728252, last_state_change = 1248342907, <br>
&gt; &gt; last_hard_state_change = 1248342907, has_been_checked = <br>
&gt; &gt; 1, current_notification_number = 0, current_notification_id =
0, <br>
&gt; &gt; check_flapping_recovery_notification = 0, scheduled_downtime_depth
= 0, <br>
&gt; &gt; pending_flex_downtime = 0, is_flapping = 0,<br>
&gt; &gt; &nbsp;flapping_comment_id = 0, percent_state_change = 0.000000,
output = 'SNMP <br>
&gt; &gt; OK - TODEFINE', long_output = '', perf_data = '' WHERE host_name
= 'xxxx' <br>
&gt; &gt; AND service_description = 'b<br>
&gt; &gt; np-check-snmpd']: 2006: MySQL server has gone away<br>
&gt; <br>
&gt; Does it ever say that it's managed to connect o the MySQL server in<br>
&gt; the first place?</tt></font>
<br>
<br><font size=2><tt>Yes, I think so because my database gets updated</tt></font>
<br>
<br><font size=2><tt>Here is some log extract from daemon.log when I have
started merlind</tt></font>
<br>
<br><font size=2><tt>[1251727986] 6: Initializing IPC socket '/bnp/apps/nagios/merlin/ipc.sock'
for daemon</tt></font>
<br><font size=2><tt>[1251727986] 6: Primed object states for 0 hosts and
0 services</tt></font>
<br><font size=2><tt>[1251727986] 6: Merlin daemon &nbsp;successfully initialized</tt></font>
<br><font size=2><tt>[1251727997] 6: Accepting inbound connection on ipc
socket</tt></font>
<br><font size=2><tt>[1251727997] 6: inbound data available on ipc socket</tt></font>
<br>
<br><font size=2><tt>[1251727997] 6: Executing import command 'php /bnp/apps/nagios/merlin/import.php
--nagios-cfg=/bnp/apps/nagios/etc/nagios.cfg --cache=/bnp/apps/nagios/var/ob
jects.cache --db-name=merlindb --db-user=merlin --db-pass=xxx --db-host=eqd-nagios-sql
--status-log=/bnp/apps/nagios/var/status.dat'</tt></font>
<br><font size=2><tt>[1251727997] 6: Handled 5 ipc events in 0.002 seconds</tt></font>
<br><font size=2><tt>[1251727998] 6: inbound data available on ipc socket</tt></font>
<br>
<br><font size=2><tt><br>
&gt; <br>
&gt; &gt; <br>
&gt; &gt; Until that point, everything to be good and the merlind process
is still <br>
&gt; &gt; running.<br>
&gt; &gt; <br>
&gt; &gt; ** But when the MySQL server is up again, I see a lot of messages
like <br>
&gt; &gt; that :<br>
&gt; &gt; <br>
&gt; &gt; [1251728254] 6: Handled 110 ipc events in 0.086 seconds<br>
&gt; &gt; [1251728255] 6: inbound data available on ipc socket<br>
&gt; &gt; <br>
&gt; &gt; [1251728255] 6: dbi_conn_query_null(): Failed to run [UPDATE
<br>
&gt; &gt; merlindb.program_status SET is_running = 1, last_alive = 1251728255,
<br>
&gt; &gt; program_start = 1251727995, pid = 24400, daemon_mo<br>
&gt; &gt; de = 1, last_command_check = 1251728254, last_log_rotation =
0, <br>
&gt; &gt; notifications_enabled = 1, active_service_checks_enabled = 1,
<br>
&gt; &gt; passive_service_checks_enabled = 1, active_host_checks<br>
&gt; &gt; _enabled = 1, passive_host_checks_enabled = 1, event_handlers_enabled
= 1, <br>
&gt; &gt; flap_detection_enabled = 0, failure_prediction_enabled = 1, <br>
&gt; &gt; process_performance_data = 0, obsess_over_hos<br>
&gt; &gt; ts = 0, obsess_over_services = 0, modified_host_attributes =
0, <br>
&gt; &gt; modified_service_attributes = 0, global_host_event_handler =
'', <br>
&gt; &gt; global_service_event_handler = ''WHERE instance_id <br>
&gt; &gt; = 0]: 2006: MySQL server has gone away<br>
&gt; <br>
&gt; Basically the same, then. Again, has it ever stated that it has<br>
&gt; successfully connected to the MySQL server?<br>
&gt; <br>
&gt; &gt; <br>
&gt; &gt; And after that, the logs are filled with the same messages :
handled ipc <br>
&gt; &gt; event, inbound data and failed query<br>
&gt; &gt; <br>
&gt; &gt; I have restarted the merlind process, it ran an import and after,
it works <br>
&gt; &gt; fine again<br>
&gt; &gt; <br>
&gt; <br>
&gt; Ok. In that case it's not a configuration error. Can you try using
the<br>
&gt; latest git snapshot (download it directly from git for simpler updates)<br>
&gt; and see if that solves this particular problem?<br>
&gt; <br>
&gt; The latest core code changes can be found in v0.6.2-beta11.<br>
&gt; <br>
</tt></font>
<br><font size=2><tt>I will try later in the day. But one last thing weird.
Yesterday, after restarted</tt></font>
<br><font size=2><tt>the merlind process, ninja stop displaying any information
about hosts and services.</tt></font>
<br><font size=2><tt>After some search, I have ssen that the table host
show 0 rows. Other tables get</tt></font>
<br><font size=2><tt>updated but not host.</tt></font>
<br>
<br><font size=2><tt>The logs are showing the process restarted and the
initial import</tt></font>
<br>
<br><font size=2><tt>[1251729329] 6: Handled 1 ipc events in 0.001 seconds</tt></font>
<br><font size=2><tt>[1251729338] 6: Initializing IPC socket '/bnp/apps/nagios/merlin/ipc.sock'
for daemon</tt></font>
<br><font size=2><tt>[1251729339] 6: Primed object states for 2004 hosts
and 14809 services</tt></font>
<br><font size=2><tt>[1251729339] 6: Merlin daemon &nbsp;successfully initialized</tt></font>
<br><font size=2><tt>[1251729342] 6: Accepting inbound connection on ipc
socket</tt></font>
<br><font size=2><tt>[1251729342] 6: inbound data available on ipc socket</tt></font>
<br>
<br><font size=2><tt>[1251729342] 6: Executing import command 'php /bnp/apps/nagios/merlin/import.php
--nagios-cfg=/bnp/apps/nagios/etc/nagios.cfg --cache=/bnp/apps/nagios/var/ob</tt></font>
<br><font size=2><tt>jects.cache --db-name=merlindb --db-user=merlin --db-pass=xxx
--db-host=eqd-nagios-sql --status-log=/bnp/apps/nagios/var/status.dat'</tt></font>
<br><font size=2><tt>[1251729342] 6: Executing import command 'php /bnp/apps/nagios/merlin/import.php
--nagios-cfg=/bnp/apps/nagios/etc/nagios.cfg --cache=/bnp/apps/nagios/var/ob</tt></font>
<br><font size=2><tt>jects.cache --db-name=merlindb --db-user=merlin --db-pass=xxx
--db-host=eqd-nagios-sql --status-log=/bnp/apps/nagios/var/status.dat'</tt></font>
<br><font size=2><tt>[1251729342] 6: Executing import command 'php /bnp/apps/nagios/merlin/import.php
--nagios-cfg=/bnp/apps/nagios/etc/nagios.cfg --cache=/bnp/apps/nagios/var/ob</tt></font>
<br><font size=2><tt>jects.cache --db-name=merlindb --db-user=merlin --db-pass=xxx
--db-host=eqd-nagios-sql --status-log=/bnp/apps/nagios/var/status.dat'</tt></font>
<br><font size=2><tt>[1251729342] 6: Handled 66 ipc events in 0.477 seconds</tt></font>
<br><font size=2><tt>[1251729358] 6: inbound data available on ipc socket</tt></font>
<br>
<br><font size=2><tt>[1251729358] 6: Executing import command 'php /bnp/apps/nagios/merlin/import.php
--nagios-cfg=/bnp/apps/nagios/etc/nagios.cfg --cache=/bnp/apps/nagios/var/ob</tt></font>
<br><font size=2><tt>jects.cache --db-name=merlindb --db-user=merlin --db-pass=xxx
--db-host=eqd-nagios-sql --status-log=/bnp/apps/nagios/var/status.dat'</tt></font>
<br><font size=2><tt>[1251729358] 6: Handled 50 ipc events in 0.019 seconds</tt></font>
<br><font size=2><tt>[1251729359] 6: inbound data available on ipc socket</tt></font>
<br>
<br><font size=2><tt>But the next import has been made at timestamp 1251767006</tt></font>
<br>
<br><font size=2><tt>[1251767006] 6: Executing import command 'php /bnp/apps/nagios/merlin/import.php
--nagios-cfg=/bnp/apps/nagios/etc/nagios.cfg --cache=/bnp/apps/nagios/var/ob</tt></font>
<br><font size=2><tt>jects.cache --db-name=merlindb --db-user=merlin --db-pass=xxx
--db-host=eqd-nagios-sql --status-log=/bnp/apps/nagios/var/status.dat'</tt></font>
<br>
<br><font size=2><tt>It seems that 37648 seconds has passed before an another
import. Maybe this is the</tt></font>
<br><font size=2><tt>correct behaviour, but I don't really understand why
the table host contain 0 rows</tt></font>
<br><font size=2><tt>for several minutes/hours.</tt></font>
<br>
<br><font size=2><tt>&gt; Thanks for your reports. I really appreciate
them :-)</tt></font>
<br>
<br><font size=2><tt>You're welcome. We are looking for a good tool to
allow a team to have access to the</tt></font>
<br><font size=2><tt>Nagios events. We are testing NDOutils and Merlin.
with NDO, nagios is too long to</tt></font>
<br><font size=2><tt>restart, and it is not acceptable. With Merlin, nagios
starts immediately, that's cool :)</tt></font>
<br><font size=2><tt>We just want to be sure that there is no side effect
with Merlin so I test it. When</tt></font>
<br><font size=2><tt>things seems to settle down, I will look the database
schema to see how they will be</tt></font>
<br><font size=2><tt>able to get the events from the merlin database</tt></font>
<br>
<br><font size=2><tt>Regards</tt></font>
<br>
<br><font size=2><tt>Nicolas</tt></font><pre>



This message and any attachments (the "message") is
intended solely for the addressees and is confidential. 
If you receive this message in error, please delete it and 
immediately notify the sender. Any use not in accord with 
its purpose, any dissemination or disclosure, either whole 
or partial, is prohibited except formal approval. The internet
can not guarantee the integrity of this message. 
BNP PARIBAS (and its subsidiaries) shall (will) not 
therefore be liable for the message if modified. 
Do not print this message unless it is necessary,
consider the environment.

                ---------------------------------------------

Ce message et toutes les pieces jointes (ci-apres le 
"message") sont etablis a l'intention exclusive de ses 
destinataires et sont confidentiels. Si vous recevez ce 
message par erreur, merci de le detruire et d'en avertir 
immediatement l'expediteur. Toute utilisation de ce 
message non conforme a sa destination, toute diffusion 
ou toute publication, totale ou partielle, est interdite, sauf 
autorisation expresse. L'internet ne permettant pas 
d'assurer l'integrite de ce message, BNP PARIBAS (et ses
filiales) decline(nt) toute responsabilite au titre de ce 
message, dans l'hypothese ou il aurait ete modifie.
N'imprimez ce message que si necessaire,
pensez a l'environnement.
</pre>