# Linux Server (SP Agent)
This package is designed to monitor Linux Servers using the ServicePilot Linux System Agent.
This package automatically configures the ServicePilot Manager to collect statistics from the Linux server on which the ServicePilot Linux System Agent has been deployed. The statistics gathered in this way include:
CPU and Memoryutilization, global network and disk IOs
- Storage: detailed
physical diskutilization (optional)
- Network: detailed
Interfacestatus and utilization (optional)
running Processesand related resource consumption
The Linux Server (SP Agent) package supports:
- RedHat, CentOS, Fedora, Ubuntu and Debian
A ServicePilot Linux System Agent must be installed on the server to be monitored.(In your ServicePilot Manager Web Interface, go to Settings > Agents, click on Install an agent and then click on Get Started for Linux Agent. The steps to download and install the Linux Agent will be displayed.)
Network Flows - It is necessary to ensure network connectivity between ServicePilot and the monitored device. In case of a network infrastructure with a firewall, all of the following flows must be opened:
- ServicePilot Manager Web server access (by default TCP/80 when using HTTP or TCP/443 when using HTTPS although this port is configurable): Between ServicePilot Linux System Agent and ServicePilot Manager
- ServicePilot Manager minimum version: 8.5
- ServicePilot Linux System Agent Minimum version: 8.5 installed and configured
Before adding a resource to monitor, make certain that all pre-requisites are in place and if a ServicePilot Agent is required, that it is communicating correctly with the ServicePilot Manager.
Add resource using Views Configuration web interface
- As an administrative user of ServicePilot, open the ServicePilot web interface.
- Navigate to Administration. The Configuration > Views web page will open.
- Click on the view in which to place the new resource in the Views hierarchy on the left of the interface. The View editor section will show the existing view contents.
- From the Packages list on the right of the interface, click and drag the server-linux-sp-agent package into the View editor and let go.
- The Resource properties dialog box will open to allow resource configuration.
- Click OK to close the Resource properties dialog box. Note that the dialog box will not close if required parameters are not set.
- Click Save to apply the new resource to ServicePilot configuration.
Key field notes
In the Monitoring Policies tab, specify the policy or policies to apply to the resource
Monitoring Options tab:
- Disk detail: tick to get statistics for all disks
- Interface detail: tick to get statistics for all network interfaces
- Processes: A multi-line text field containing one process per line. Each line consists of 4 fields that are comma (,) separated. The first field is the process Name. The second field is a process alias. If the alias field is empty then the process name will be used. Use an alias if the process Name is not unique. The third field is the process CommandLine parameter. If the CommandLine parameter is empty then it is assumed that only one process with a particular name is running. The last field is the process ExecutablePath parameter. If the ExecutablePath parameter is empty then it is assumed that only one process with a particular name is running. Following is an example:
`snmpd,SNMP Daemon,/usr/sbin/snmpd -LS0-6d -Lf /dev/null -p /var/run/snmpd.pid,/usr/sbin/snmpd`
- It is possible to get a list of processes by running a
ps -efcommand. Note that output of this command might be truncated. The ServicePilot Linux Agent obtains the process name from
/proc/#/statfiles. The process name is found between the first set of parentheses. The process command line is obtained from the
/proc/#/cmdlinefile. This file needs to be opened with a text editor rather than using
catso that special delimiter characters are seen. Replace these with spaces and take the full content of this file as the command line. The executable path is the first part of the
cmdlinefile until the first delimiter.