PEM Worker Usage Guide

The PEM Worker performs tasks on behalf of the PEM Agent. The following command-line options are supported by the PEM Worker:

  • On Linux:
     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    $./pemworker
    Postgres Enterprise Manager Agent
    Version: 7.11.0
    (Revision: REL-7_10_0-7-33-g9633467, Built on: Oct 17 2019 15:01:02)
    Schema Supported: 201910101
    
    ./pemworker [options]
    ./pemworker --register-agent [register-options]
    ./pemworker --register-server [register-server-options]
    ./pemworker --unregister-server [unregister-server-options]
    ./pemworker --unregister-agent [unregister-agent-options]
    
    options:
      -v/--version (Show the version & the supported schema and, then exit.)
      -c <filepath> (Path to the configuration file.)
      -o <option name>=<option value> (Override the configuration file options.)
      -f Run in the foreground (do not detach from the terminal.)
      -t <short_wait> (Default: 10, Poll time interval (in seconds).)
      -r <long_wait> (Default: 30, Retry period (in seconds) after connection aborted.)
      -s <log file> (Path to the worker log file. Messages are logged to STDOUT if not specified.)
      -l <logging verbosity> (Default: ERROR, Possible Values: ERROR, WARNING, DEBUG1, DEBUG2)
      --allow_server_restart <true|false> (Default: true, Allow to restart the monitored server.)
      --allow-batch-probes <true|false> (Default: false, Allow to run the batch probes on this agent.)
      --batch-script-user <os-user> (Default: <none>, Name of the operating system user to run the batch script that is defined as a batch probe and a step in jobs.)
      --enable-heartbeat-connection (Default: false, Agent to use dedicated connection to update the heartbeat)
      --enable-smtp <true|false> (Default: false, Allow the PEM agent to send the email on behalf of the PEM server.)
      --enable-snmp <true|false> (Default: false, Allow the PEM agent to send the SNMP traps on behalf of the PEM server.)
    
    register-options:
      --pem-server <hostname|address> (Host name/address of the PEM backend database server.)
      --pem-port <port number (Default: 5432, Port of the PEM backend database server.)
      --pem-user <username> (Database user, having superuser privileges, of the PEM backend database server.)
      --pem-agent-user <username> (Default: agent<agent_id>, Agent user to connect the PEM server backend database server)
      --cert-path <path> (Default: "~/.pem", Path where SSL certificates are saved.)
      --config-dir <path> (Default: "<pemworker path>/../etc", Directory path where configuration file can be found.)
      --display-name <name> (Default: system hostname, Display name for the agent.)
      --force-registration (forcefully registers the agent to PEM server with arguments provided.)
      --group <name> (Specify the group name where registered agent will be displayed.)
      --team <database-role> (Specify the name of the database role, on the PEM backend database server, that should have access to the monitored database server.)
      --owner <database-user> <Specify the name of the database user, on the PEM backend database server, who will own the agent.)
      --allow_server_restart <true|false> (Default: true, Allow to restart the monitored server.)
      --allow-batch-probes <true|false> (Default: false, Allow to run the batch probes on this agent.)
      --batch-script-user <os-user> (Default: <none>, Name of the operating system user to run the batch script that is defined as a batch probe and a step in jobs.)
      --enable-heartbeat-connection (Default: false, Agent to use dedicated connection to update the heartbeat)
      --enable-smtp <true|false> (Default: false, Allow the PEM agent to send the email on behalf of the PEM server.)
      --enable-snmp <true|false> (Default: false, Allow the PEM agent to send the SNMP traps on behalf of the PEM server.)
      -o <option name>=<option value> (Override the configuration file options.)
    
      NOTE:
       Set environment variable PEM_SERVER_PASSWORD to provide the password for the
       PEM server to allow the pemworker to register itself.
    
    register-server-options:
      --pem-user <username> (Database user, a member of 'pem_admin' role, of the PEM backend database server.)
      --display-name <name> (Default: system hostname, Display name for the monitored database server.)
      --server-addr <hostname|address> (Host name/address of the database server to register with PEM server.)
      --server-port <port> (Port of the database server.)
      --server-database <name>(Postgres server database.)
      --server-user <name>(Database server user name.)
      --server-service-name <service-name> (Database server service name.)
      --efm-cluster-name <name> (EFM Cluster name.)
      --efm-install-path <path> (EFM installation path.)
      --remote-monitoring <true|false> (Allow remote monitoring.)
      --group <name> (Specify the group name where registered server will be displayed.)
      --team <datase-role> (Specify the name of the database role, on the PEM backend database server, that should have access to the monitored database server.)
      --owner <name> (Specify the name of the database user who will own the monitored server.)
      --asb-host-name <hostname> (Host name that the agent will use to connect to the database server. If not provided then '--server-addr' value will be used.)
      --asb-host-port <port> (Port number that agent will use to connect to database server. If not provided then '--server-port' value will be used.
      --asb-host-db <database> (Database name that agent will use to connect to database server. If not provided then '--server-database' value will be used.)
      --asb-host-user <database-user> (Database username that agent will use to connect to database server. If not provided then '--server-user' value will be used.)
      --asb-ssl-mode <ssl-mode> (Default: 'prefer', SSL mode that agent will use to connect to database server.)
    
      NOTE:
       Set environment variable PEM_SERVER_PASSWORD to provide the password for the
       PEM server to allow the pemworker to connect as a PEM admin user. Set
       PEM_MONITORED_SERVER_PASSWORD to provide the password of the database server being
       registered and monitored by pemagent.
    
    unregister-server-options:
      --pem-user <username> (Database user, a member of 'pem_admin' role, of the PEM backend database server.)
      --server-addr (Database server address to unregister from PEM server.)
      --server-port (Port of database server.)
      --config-dir <Directory path of agent configuration file (Default: "<pemworker path>/../etc")
    
    unregister-agent-options:
      --pem-user <username> (Database user, a member of 'pem_admin' role, of the PEM backend database server.)
      --config-dir <Directory path of agent configuration file (Default: "<pemworker path>/../etc")
    
      NOTE:
       Set environment variable PEM_SERVER_PASSWORD to provide the password for the
       PEM server to allow the pemworker to connect as a PEM admin user.
    
  • On Windows:
     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    C:\Program Files\edb\pem\agent\bin> pemworker.exe --help
    Postgres Enterprise Manager Worker
    Version: 7.11.0
    
    pemworker.exe DEBUG [options]
    pemworker.exe REGISTER [register-options]
    pemworker.exe REGISTER-SERVER [register-server-options]
    pemworker.exe UNREGISTER-SERVER [unregister-server-options]
    pemworker.exe UNREGISTER-AGENT [unregister-agent-options]
    
    options:
      -v/--version (Show the version & the supported schema and, then exit.)
      -c <filepath> (Path to the configuration file.)
      -o <option name>=<option value> (Override the configuration file options.)
      -t <short_wait> (Default: 10, Poll time interval (in seconds).)
      -r <long_wait> (Default: 30, Retry period (in seconds) after connection aborted.)
      -l <logging verbosity> (Default: ERROR, Possible Values: ERROR, WARNING, DEBUG1, DEBUG2)
      --allow_server_restart <true|false> (Default: true, Allow to restart the monitored server.)
      --allow-batch-probes <true|false> (Default: false, Allow to run the batch probes on this agent.)
      --enable-heartbeat-connection (Default: false, Agent to use dedicated connection to update the heartbeat)
      --enable-smtp <true|false> (Default: false, Allow the PEM agent to send the email on behalf of the PEM server.)
      --enable-snmp <true|false> (Default: false, Allow the PEM agent to send the SNMP traps on behalf of the PEM server.)
    
    register-options:
      --pem-server <hostname|address> (Host name/address of the PEM backend database server.)
      --pem-port <port number (Default: 5432, Port of the PEM backend database server.)
      --pem-user <username> (Database user, having superuser privileges, of the PEM backend database server.)
      --pem-agent-user <username> (Default: agent<agent_id>, Agent user to connect the PEM server backend database server)
      --cert-path <path> (Default: "%APPDATA%\pem", Path where SSL certificates are saved.)
      --display-name <name> (Default: system hostname, Display name for the agent.)
      --force-registration (forcefully registers the agent to PEM server with arguments provided.)
      --group <name> (Specify the group name where registered agent will be displayed.)
      --team <database-role> (Specify the name of the database role, on the PEM backend database server, that should have access to the monitored database server.)
      --owner <database-user> <Specify the name of the database user, on the PEM backend database server, who will own the agent.)
      --allow_server_restart <true|false> (Default: true, Allow to restart the monitored server.)
      --allow-batch-probes <true|false> (Default: false, Allow to run the batch probes on this agent.)
      --enable-heartbeat-connection (Default: false, Agent to use dedicated connection to update the heartbeat)
      --enable-smtp <true|false> (Default: false, Allow the PEM agent to send the email on behalf of the PEM server.)
      --enable-snmp <true|false> (Default: false, Allow the PEM agent to send the SNMP traps on behalf of the PEM server.)
      -o <option name>=<option value> (Override the configuration file options.)
    
      NOTE:
       Set environment variable PEM_SERVER_PASSWORD to provide the password for the
       PEM server to allow the pemworker to register itself.
    
    register-server-options:
      --pem-user <username> (Database user, a member of 'pem_admin' role, of the PEM backend database server.)
      --display-name <name> (Default: system hostname, Display name for the monitored database server.)
      --server-addr <hostname|address> (Host name/address of the database server to register with PEM server.)
      --server-port <port> (Port of the database server.)
      --server-database <name>(Postgres server database.)
      --server-user <name>(Database server user name.)
      --server-service-name <service-name> (Database server service name.)
      --remote-monitoring <true|false> (Allow remote monitoring.)
      --group <name> (Specify the group name where registered server will be displayed.)
      --team <database-role> (Specify the name of the database role, on the PEM backend database server, that should have access to the monitored database server.)
      --owner <name> (Specify the name of the database user who will own the monitored server.)
      --asb-host-name <hostname> (Host name that the agent will use to connect to the database server. If not provided then '--server-addr' value will be used.)
      --asb-host-port <port> (Port number that agent will use to connect to database server. If not provided then '--server-port' value will be used.
      --asb-host-db <database> (Database name that agent will use to connect to database server. If not provided then '--server-database' value will be used.)
      --asb-host-user <database-user> (Database username that agent will use to connect to database server. If not provided then '--server-user' value will be used.)
      --asb-ssl-mode <ssl-mode> (Default: 'prefer', SSL mode that agent will use to connect to database server.)
    
      NOTE:
       Set environment variable PEM_SERVER_PASSWORD to provide the password for the
       PEM server to allow the pemworker to connect as a PEM admin user. Set
       PEM_MONITORED_SERVER_PASSWORD to provide the password of the database server being
       registered and monitored by pemagent.
    
    unregister-server-options:
      --pem-user <username> (Database user, a member of 'pem_admin' role, of the PEM backend database server.)
      --server-addr (Database server address to unregister from PEM server.)
      --server-port (Port of database server.)
      --config-dir <Directory path of agent configuration file (Default: "<pemworker path>/../etc")
    
    unregister-agent-options:
      --pem-user <username> (Database user, a member of 'pem_admin' role, of the PEM backend database server.)
    
      NOTE:
       Set environment variable PEM_SERVER_PASSWORD to provide the password for the
       PEM server to allow the pemworker to connect as a PEM admin user.