Skip to main content
Version: Self Hosted Lite

Install sfAgent on Linux


sfAgent is a lightweight agent installed on VMs to collect metrics, logs and tracing data.

Tested on

  • Ubuntu 16 LTS, 18 LTS, 20 LTS
  • Centos 7, 8
  • RHEL 7, 8.5
  • Linux SUSE


sfAgent requires certain pre-requisites for monitoring. Common pre-requisites are mentioned below. Further, all pre-requisites and configurations needed for monitoring a specific application are mentioned under Integrations section.

  • For Linux OS monitoring, install iostat

    sudo apt-get install sysstat


    sudo yum install sysstat 


    sudo zypper install sysstat
  • For JVM monitoring, install java headless service for jcmd & jmap command

    sudo apt-get install –y openjdk-12-jdk-headless


    sudo yum -y install  java-1.8.0-openjdk-devel-1.8.0*


Run the following commands to install sfAgent on VMs:

wget -O
chmod +x
sudo ./

sfAgent executes commands such as iostat or jcmd to fetch metrics. If the utilities are not included in the PATH variable or not installed in the default location, use -p or --include-paths to add PATH in sfAgent.


./ -p /opt/jdk1.8.0_211/bin/

To install sfAgent on multiple end-points using Ansible playbook, refer the following script at


sfAgent can be either configured manually or automatically. In an automatic configuration step, sfAgent discovers services running in a VM and automatically generates a default configuration for monitoring the discovered services. User can further modify the configurations as needed. Check Configuration format for more details. Detailed configuration for a specific application types are present in Integrations section.

Follow the steps below for automatic discovery & configuration

  • Run following commands to discover services and generate config:

    sudo su 
    cd /opt/sfagent
    ./sfagent -generate-config
    cp config-generated.yaml config.yaml
  • Add the profile key and SnappyFlow tags in the configuration file (config.yaml).

    • Copy profile key from SnappyFlow and update key:

    • Set values for Name:, appName:, projectName: under tags: section. Name: is the host name and the projectName: and appName: are the project name and application name used on the Snappyflow portal.

    • Verify configuration and restart sfAgent

      ./sfagent -check-config 
      service sfagent restart

sfAgent log file is present in the path /var/log/sfagent/sfagent.log.

Upgrade sfAgent on Linux

Run following commands to upgrade sfAgent:

wget -O 
chmod +x
sudo ./ --upgrade

sfAgent Configuration Format

sfAgent is configured through its config.yaml file. There are sections for metrics and logs where appropriate plugins with their configurations have to added to these sections. sfAgent config is expected in the following format:

key: <add profile key here> 
generate_name: true
Name: <add name tag>
appName: <add application name tag>
projectName: <add project name tag>
- name: <metric-plugin>
enabled: true
interval: <time in secs>
- name: <logger-plugin>
enabled: true
- list
- of
- log
- levels
log_path: <comma separated log paths>


Run the following commands to uninstall sfAgent on VMs:

wget -O
chmod +x
sudo ./