# README

Scripted Inputs Receiver

Status
Stabilitydevelopment: logs
Distributionscontrib

Overview

The scripted inputs receiver is a component that performs log collection equivalent to what the UF does when the Unix and Linux Technical Add-on is installed. It must be run directly on host and is not supported in container.

Configuration

Script nameDescription
bandwidthNetwork statistics via the shell commands dlstat, netstat, and sar
cpuCPU statistics via the shell commands sar, mpstat, and iostat
dfFree disk space for each mount point via the shell commands df, mount, and fstyp
hardwareHardware information via the shell commands cpuinfo, df, dmesg, ifconfig, ioscan, iostat, ip, lanscan, lsattr, lscfg, lsdev, lsps, lspv, meminfo, mpstat, prtconf, prtdiag, sysctl, system_profiler, swap, swapinfo, and top
interfacesConfigured network interfaces via the shell commands dmesg, ethtool, ifconfig, kstat, lanscan, lanadmin, and netstat
iostatInput/output statistics for block devices and partitions via the shell commands darwin_disk_stats, iostat, and sar
lastlogLast login times for system accounts via the shell commands last, lastb, and lastlogin
lsofProcess information via the shell command lsof
netstatNetwork connections, routing tables, and network interface information via the shell command netstat
nfsiostatCollects NFS mounts data via the shell command nfsiostat. Requires the nfs-utils package.
openPortsAvailable network ports via the shell command netstat
openPortsEnhancedTCP/UDP ports in a listening state, and information on process, process ID, IP version, and so on. via the shell commands lsof, and netstat
packageLists installed software packages via the shell commands dpkg-query, pkginfo, pkg_info, pkg info, system_profiler, and swlist
passwdShows username and associated user ID, user group ID, and shell
protocolTCP/UDP transfer statistics via the shell command netstat
psStatus of current running processes via the shell command ps
rlogLinux Auditing System events information recorded in /var/log/audit/audit.log by auditd
selinuxCheckerParses /etc/sysconfig/selinux to check if SELinux is configured
serviceRunning services and associated details via the shell commands chkconfig, dscl, svcs, and systemctl
sshdCheckerParses sshd_config for information local sshd configurations
timeSystem date and time, and NTP server time via the shell commands and chronyc, date andntpdate
topList of running system processes via the shell commands ps and top
updateAvailable software updates for installed packages via the shell commands softwareupdate and yum
uptimeSystem date and uptime information via the shell command date
usersWithLoginPrivsShows system username information
versionOS version details via the shell command uname
vmstatProcess-related memory usage information via the shell commands prstat, prtconf, ps, sar, svmon, swap, swapinfo, sysctl, top, uptime, and vmstat
vsftpdCheckerParses vsftpd.conf for information about local VSFTP server configurations in /etc, /etc/vsftpd, or /private/etc
whoInformation about all users currently logged in via the shell command who

The following settings are required:

  • script_name : Name of the script to be executed.
  • collection_interval : (default = 60s) how often the script should be executed

The following settings are optional:

  • source : source of the event
  • sourcetype : sourcetype of the event
  • multiline : how the standard output of the script is split, works exactly the same way as the multiline setting of filelog receiver Example:
receivers:
  scripted_inputs/df:
    script_name: df
    collection_interval: 10s
    source: df
    sourcetype: df
    multiline:
      line_end_pattern: '\n'
service:
  pipelines:
    logs:
      receivers: [scripted_inputs/df]
      processors: [memory_limiter, batch]
      exporters: [splunk_hec]