Welcome to Pandora FMS Community!

Find answers, ask questions, and connect with our community around the world.

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

    Hi,

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

    Moderator
    November 5, 2020 at 15:54
    39 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    ¡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

  • diego-m

    Moderator
    November 17, 2020 at 15:33
    500 Karma points
    Community rank: tentacle_master_icon Tentacle Master
    Like it
    Up
    0
    Down
    Drop it
    ::

    Good

    Please, check the file /var/log/pandora/pandora_server.log and tell us if you see any related error. You can also send it to us so that we can check it.

    Greetings
    Diego

  • diego-m

    Moderator
    November 17, 2020 at 15:35
    500 Karma points
    Community rank: tentacle_master_icon Tentacle Master
    Like it
    Up
    0
    Down
    Drop it
    ::

    Hello

    Please, check the file /var/log/pandora/pandora_server.log and tell us if you see any related error. You can also send it to us so that we can check it.

    Greetings
    Diego

  • chathura

    Member
    November 18, 2020 at 14:30
    18 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    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.