Welcome to Pandora FMS Community › Forums › Community support › [Solved] Server crash notifications
-
[Solved] Server crash notifications
Posted by chathura on November 5, 2020 at 09:54Hi,
I’m getting following notifications time to time (every 10-15 minutes) and goes away. but there are no errors logged in pandora_server.error. server service seems to run fine. There are no restarts or stops in the service.
i’m running Pandorafms v7.0NG.749 – Build PC200909 – MR 41 on Ubuntu 16.04.7 LTS
Any help will be appreciated.
Thanks.
chathura replied 4 years, 1 month ago 3 Members · 4 Replies -
4 Replies
-
::
¡Hi!
I am reading this function, it seems to me (maybe) ¿a time problem from server? (other reason: old cache at database).Â
Or maybe I am wrong with this theory.  public function checkPandoraServers()   {     $servers = db_get_all_rows_sql(       'SELECT         id_server,         name,         server_type,         server_keepalive,         status,         unix_timestamp() - unix_timestamp(keepalive) as downtime       FROM tserver       WHERE         unix_timestamp() - unix_timestamp(keepalive) > server_keepalive         OR status = 0'     );
Line 1201:
 https://github.com/pandorafms/pandorafms/blob/7b4395c537ec768686410473abf097c771e97bc6/pandora_console/include/class/ConsoleSupervisor.php -
-
-
::
I was managed to solved the problem. Thank you Jimmy_Olano for pointing me to the code.
Below is the DB query how pandorafms check for server status. line 1298
public function checkPandoraServerMasterAvailable()   {     $n_masters = db_get_value_sql(       'SELECT         count(*) as n       FROM tserver       WHERE         unix_timestamp() - unix_timestamp(keepalive) 0         AND status = 1'     );
This checks whether last keepalive value is lower than than the defined threshold. If difference of the keepalive more than the defined threshold, it will generate notification.
Earlier I had configured server_threshold = 60 intentionally (default value = 5) while server_keepalive 45 (default) in pandora_server.conf which will result server upating tserver table keepalive on every 60 seconds. So, that cause notifications popping up randomly.
Now i have reduced server_threshold = 15. so no more false notifications.