Module for returning various status data about a minion. These data can be useful for compiling into stats later.
Return a composite of all status data and info for this minion. Warning: There is a LOT here!
CLI Example:
salt '*' status.all_status
Changed in version 2016.3.2: Return the CPU info for this minion
Changed in version 2016.11.4: Added support for AIX
Changed in version 2018.3.0: Added support for NetBSD and OpenBSD
CLI Example:
salt '*' status.cpuinfo
Return the CPU stats for this minion
Changed in version 2016.11.4: Added support for AIX
Changed in version 2018.3.0: Added support for OpenBSD
CLI Example:
salt '*' status.cpustats
Return a custom composite of status data and info for this minion, based on the minion config file. An example config like might be:
status.cpustats.custom: [ 'cpu', 'ctxt', 'btime', 'processes' ]
Where status refers to status.py, cpustats is the function where we get our data, and custom is this function It is followed by a list of keys that we want returned.
This function is meant to replace all_status(), which returns anything and everything, which we probably don't want.
By default, nothing is returned. Warning: Depending on what you include, there can be a LOT here!
CLI Example:
salt '*' status.custom
Changed in version 2016.3.2: Return the disk stats for this minion
Changed in version 2016.11.4: Added support for AIX
CLI Example:
salt '*' status.diskstats
Return the disk usage for this minion
Usage:
salt '*' status.diskusage [paths and/or filesystem types]
CLI Example:
salt '*' status.diskusage # usage for all filesystems
salt '*' status.diskusage / /tmp # usage for / and /tmp
salt '*' status.diskusage ext? # usage for ext[234] filesystems
salt '*' status.diskusage / ext? # usage for / and all ext filesystems
Return the load averages for this minion
Changed in version 2016.11.4: Added support for AIX
CLI Example:
salt '*' status.loadavg
:raises CommandExecutionError: If the system cannot report loadaverages to Python
New in version 2014.7.0.
Return the connection status with master. Fire an event if the connection to master is not as expected. This function is meant to be run via a scheduled job from the minion. If master_ip is an FQDN/Hostname, it must be resolvable to a valid IPv4 address.
Changed in version 2016.11.4: Added support for AIX
CLI Example:
salt '*' status.master
Return the memory info for this minion
Changed in version 2016.11.4: Added support for AIX
Changed in version 2018.3.0: Added support for OpenBSD
CLI Example:
salt '*' status.meminfo
Changed in version 2016.3.2: Return the network device stats for this minion
Changed in version 2016.11.4: Added support for AIX
CLI Example:
salt '*' status.netdev
Return the network stats for this minion
Changed in version 2016.11.4: Added support for AIX
Changed in version 2018.3.0: Added support for OpenBSD
CLI Example:
salt '*' status.netstats
Return the number of processing units available on this system
Changed in version 2016.11.4: Added support for AIX
Changed in version 2018.3.0: Added support for Darwin, FreeBSD and OpenBSD
CLI Example:
salt '*' status.nproc
Return the PID or an empty string if the process is running or not. Pass a signature to use to find the process via ps. Note you can pass a Python-compatible regular expression to return all pids of processes matching the regexp.
Changed in version 2016.11.4: Added support for AIX
CLI Example:
salt '*' status.pid <sig>
New in version 2016.3.0.
Sends ping request to the given master. Fires '__master_failback' event on success. Returns bool result.
CLI Example:
salt '*' status.ping_master localhost
Return the process data
Changed in version 2016.11.4: Added support for AIX
CLI Example:
salt '*' status.procs
Forces proxy minion reconnection when not alive.
The virtual name of the proxy module.
Opts dictionary. Not intended for CLI usage.
CLI Example:
salt '*' status.proxy_reconnect rest_sample
New in version 2016.3.0.
Return the current time on the minion, formatted based on the format parameter.
Default date format: Monday, 27. July 2015 07:55AM
CLI Example:
salt '*' status.time
salt '*' status.time '%s'
Return the uptime for this system.
Changed in version 2015.8.9: The uptime function was changed to return a dictionary of easy-to-read
key/value pairs containing uptime information, instead of the output
from a cmd.run
call.
Changed in version 2016.11.0: Support for OpenBSD, FreeBSD, NetBSD, MacOS, and Solaris
Changed in version 2016.11.4: Added support for AIX
CLI Example:
salt '*' status.uptime
Return the system version for this minion
Changed in version 2016.11.4: Added support for AIX
Changed in version 2018.3.0: Added support for OpenBSD
CLI Example:
salt '*' status.version
Changed in version 2016.3.2: Return the virtual memory stats for this minion
Changed in version 2016.11.4: Added support for AIX
CLI Example:
salt '*' status.vmstats
Return a list of logged in users for this minion, using the w command
CLI Example:
salt '*' status.w