Package: nginx-amplify-agent-health-check
Setuppip install nginx-amplify-agent-health-checkcustom config file (in ini format):[options]heading=Amplify Agent Health Check Analysis# Amplifyamplify_agent_path=/opt/nginx-amplify-agentamplify_reqs_file=/packages/nginx-amplify-agent/requirementsamplify_conf_file=/etc/amplify-agent/agent.confamplify_log_file=/var/log/amplify-agent/agent.logamplify_pid_file=/var/run/amplify-agent/amplify-agent.pid# Nginxnginx_all_confs_path=/etc/nginxnginx_conf_file=/etc/nginx/nginx.confnginx_status_conf_file=/etc/nginx/conf.d/stub_status.confnginx_sites_available_conf_files=/etc/nginx/sites-available/*.confnginx_sites_enabled_conf_files=/etc/nginx/sites-enabled/*.confnginx_mime_types_file=/etc/nginx/mime.typesnginx_log_files=/var/log/nginx/*.lognginx_pid_file=/var/run/nginx.pidnginx_additional_metrics=['sn="$server_name"','rt=$request_time','ua="$upstream_addr"','us="$upstream_status"','ut="$upstream_response_time"','ul="$upstream_response_length"','cs=$upstream_cache_status']# Systemsystem_packages=['python', 'python-dev','git','util-linux', 'procps','curl',  # 'wget','gcc', 'musl-dev', 'linux-headers']system_find_package_command=['apk', 'info']system_time_diff_max_allowance=80Note: custom config file doesn’t need to have all the attributes of
the original config file as it will only override the specified
attributes. But it has to follow the ini formatting.Usagevia cli interface:amphccli optionsusage: amphc [-h] [-V] [-v] [-d] [-c CONFIG_FILE]
             [-x SKIP_METHODS [SKIP_METHODS ...] | -m METHODS [METHODS ...]]

Static and Dynamic Analysis for nginx-amplify-agent Health Status

optional arguments:
  -h, --help            show this help message and exit
  -V, --version         show program's version information and exit
  -v, --verbose         show all check logs
  -d, --plain           suppress decorating logs
  -c CONFIG_FILE, --config CONFIG_FILE
                        set configuration file path (i.e. in ini format)
  -x SKIP_METHODS [SKIP_METHODS ...], --skip SKIP_METHODS [SKIP_METHODS ...]
                        specify methods to skip running
  -m METHODS [METHODS ...], --methods METHODS [METHODS ...]
                        specify methods to run

verification methods:
---------------------
  1) verify_agent_log
  2) verify_agent_ps
  3) verify_agent_user
  4) verify_all_packages
  5) verify_dns_resolver
  6) verify_metrics_collection
  7) verify_ngx_config_files_access
  8) verify_ngx_logs_read_access
  9) verify_ngx_master_ps
  10) verify_ngx_metrics
  11) verify_ngx_stub_status
  12) verify_outbound_tls_access
  13) verify_proc_sys_access
  14) verify_py_pkgs
  15) verify_sys_pkgs
  16) verify_sys_ps_access
  17) verify_sys_timevia api interface:importamplifyhealthcheckasamphcamphc=amphc.configure(config_file='./custom-config.cfg'# custom config file path in ini format)amphc.verify_agent_ps()amphc.verify_agent_log()amphc.verify_agent_user()amphc.verify_ngx_master_ps()amphc.verify_ngx_stub_status()amphc.verify_ngx_logs_read_access()amphc.verify_ngx_config_files_access()amphc.verify_ngx_metrics()amphc.verify_all_packages()amphc.verify_sys_time()amphc.verify_sys_ps_access()amphc.verify_outbound_tls_access()amphc.verify_proc_sys_access()amphc.verify_dns_resolver()amphc.verify_metrics_collection()