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 Advanced troubleshooting Multiple Pandora Processes on Linux

  • Multiple Pandora Processes on Linux

    Posted by tim-ellis-smith on April 30, 2015 at 11:56

    Hi there,

    When I start Pandora on Linux (Amazon Linux AMI release 2014.09), it shows two processes:

    ps aux | grep pandora
    root      4570  0.4  0.2 153564  7764 pts/0    SN  08:26  0:00 /usr/bin/perl /usr/bin/pandora_agent /etc/pandora
    root      4575  0.0  0.1 153428  6048 pts/0    SN  08:26  0:00 /usr/bin/perl /usr/bin/pandora_agent /etc/pandora

    When I run:
    /etc/init.d/pandora_agent_daemon status
    Pandora FMS Agent is running with PID 4570.

    If I shutdown Pandora, I have to run it twice to fully shut it down.

    Is this normal? If not, is there any way to stop the two processes from starting?

    I know it’s not the init script that’s causing this, as when I run the command  /usr/bin/pandora_agent /etc/pandora it still spawns two processes.

    Many thanks in advance.

    javier replied 9 years, 9 months ago 2 Members · 3 Replies
  • 3 Replies
  • javier

    Member
    April 30, 2015 at 15:31
    0 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    Hi Tim,

    can you send me a screenshot with your agent configuration on file /etc/pandora/pandora_agent.conf?

    Regards.

  • tim-ellis-smith

    Member
    April 30, 2015 at 20:11
    0 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    Hi Javier,

    Thanks for the help.

    Please see below

    # General Parameters
    # ==================

    server_ip      xxx.xxx.xxx.xxx
    server_path    /var/spool/pandora/data_in
    temporal /var/log/pandora/tmp
    logfile /var/log/pandora/pandora_agent.log

    # Interval in seconds, 300 by default
    interval        300

    # Debug mode only generate XML, and stop after first execution
    debug          0

    # Optional. UDP Server to receive orders from outside
    udp_server 1
    udp_server_port 41122
    udp_server_auth_address xxx.xxx.xxx.xxx

    # By default, agent takes machine name
    agent_name    INTEGRATION

    # Group assigned for this agent (descriptive, p.e: Servers)
    group Integration

    # format of latitude,longitude,altitude
    # i.e.: 41.377,-5.105,2.365

    # Listening TCP port for remote server.
    server_port    41121

    # Transfer mode: tentacle, ftp, ssh or local
    transfer_mode tentacle

    # Enable or disable XML buffer.
    # If you are in a secured environment and want to enable the XML buffer you
    # should consider changing the temporal directory, since /tmp is world writable.
    xml_buffer 1

    # Minimum available bytes in the temporal directory to enable the XML buffer
    temporal_min_size 1024i

    address xxx.xxx.xxx.xxx
    description INTEGRATION
    remote_config 0

    # Secondary server configuration
    # ==============================

    # If secondary_mode is set to on_error, data files are copied to the secondary
    # server only if the primary server fails. If set to always, data files are
    # always copied to the secondary server.
    #secondary_mode on_error
    #secondary_server_ip localhost
    #secondary_server_path /var/spool/pandora/data_in
    #secondary_server_port 41121
    #secondary_transfer_mode tentacle
    #secondary_server_pwd mypassword
    #secondary_server_ssl no
    #secondary_server_opts

    # Module Definition
    # =================

    # System information

    # vmstat syntax depends on linux distro and vmstat command version, please check before use it
    module_begin
    module_name CPU Load
    module_type generic_data
    module_interval 1
    module_exec vmstat 1 2 | tail -1 | awk ‘{ print $13 }’
    module_max 100
    module_min 0
    module_description User CPU Usage (%)
    module_min_warning 70
    module_max_warning 90
    module_min_critical 91
    module_max_critical 100
    module_unit %
    module_end

    # vmstat syntax depends on linux distro and vmstat command version, please check before use it
    module_begin
    module_name CPU IOWait
    module_type generic_data
    module_interval 1
    module_exec vmstat 1 2 | tail -1 | awk ‘{ print $16 }’
    module_min_warning 10
    module_min_critical 16
    module_unit %
    module_end

    #Get load average
    module_begin
    module_name Load Average
    module_type generic_data
    module_exec cat /proc/loadavg | cut -d’ ‘ -f1
    module_description Average process in CPU (Last minute)
    module_end

    #IO Wait CPU ticks /sec
    module_begin
    module_name IOWaitCPU
    module_type generic_data_inc
    module_exec vmstat -s | grep ‘IO-wait cpu ticks’ | awk ‘{ print $1 }’
    module_unit ticks/sec
    module_description Too much IOwait means IO bottleneck and performance problems. Check also LoadAVG.
    module_end

    #Connected users
    module_begin
    module_name Connected users
    module_type generic_data
    module_exec who | wc -l
    module_end

    #Count total number of processes
    module_begin
    module_name Number processes
    module_type generic_data
    module_exec ps aux | wc -l
    module_description Total processes
    module_unit processes
    module_end

    # Async data example

    module_begin
    module_name LastLogin
    module_type async_string
    module_exec last | head -1
    module_description Monitor last user loggin
    module_end

    # Check http
    module_begin
    module_name CheckHttpd
    module_type generic_data
    module_plugin nagios_plugin_wrapper TestHttp /usr/lib64/nagios/plugins/check_http -H localhost -f follow
    module_description Check http status
    module_end

    # This plugin detects all disk and report free space (%)
    module_plugin pandora_df_free

    # This plugin detects system free memory and free swap (in %)
    module_plugin pandora_mem

    # This plugin will get the network usage (bytes/sec)
    module_plugin pandora_netusage

    # This parses /var/log/syslog file, under the module name ‘Syslog_error’
    # And search for ‘ERROR’ string into it, sending only that information.
    module_plugin grep_log /var/log/syslog Syslog_error ERROR

  • javier

    Member
    May 4, 2015 at 12:47
    0 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    Hi Tim,

    it’s a problem related to the directive “udp_server 1”. The development area is working to solve it for the SP3 version of Pandora FMS.

    Sorry for any inconvenience. It will be solved soon.

    Regards.