Package-level declarations

Types

Link copied to clipboard
data class AgentCalibrateCommand(val targets: List<CalibrationTarget> = listOf( CalibrationTarget.CPULoad, CalibrationTarget.Idle ), val threshold: Double = 50000.0, val delta: Double = 1.04, val timeOut: Long = 4, val removeTask: Boolean = true) : AgentCommand

Associate meters with units.

Link copied to clipboard
data class AgentCalibrationTask(val name: String, val startTime: String, val targets: List<CalibrationTarget>, var stopTime: String? = null, var active: Boolean = true, var success: Boolean? = null, val result: String? = null) : AgentTask
Link copied to clipboard
data class AgentCollectCommand(val flags: List<CollectorFlag> = listOf(CollectorFlag.HTTP), val session: String, val timeOut: Long = 60 * 60L, val interval: String = "0.1", val debugMode: Boolean = false) : AgentCommand

Start the collector (collectd).

Link copied to clipboard
data class AgentCollectionTask(val name: String, val startTime: String, var stopTime: String? = null, var active: Boolean = true, var success: Boolean? = null, val session: String, val flags: List<CollectorFlag>, val timeout: Long) : AgentTask
Link copied to clipboard
data class AgentCollectorStopCommand(val timestamp: Long = System.currentTimeMillis()) : AgentCommand

Stop the collector.

Link copied to clipboard
sealed interface AgentCommand

Commands to be executed by an agent.

Link copied to clipboard
data class AgentCommands(val commands: List<AgentCommand> = listOf())
Link copied to clipboard
data class AgentDetermineCapabilitiesCommand(val targets: List<CollectorFlag> = CollectorFlag.entries, val timeOut: Long = 2) : AgentCommand

Associate meters with units.

Link copied to clipboard
data class AgentDownloadMeasurementCommand(val source: String, val target: String, val uniqueId: String? = null) : AgentCommand

Fetch a measurement.

Link copied to clipboard
data class AgentDownloadTask(val name: String, val startTime: String, var stopTime: String? = null, var active: Boolean = true, var success: Boolean? = null, val source: String, val target: String, var result: String? = null) : AgentTask
Link copied to clipboard
data class AgentExecuteCommand(val args: List<String>, val timeOut: Long = 30 * 60L, val workDirectory: String? = null, val debugMode: Boolean = false, val startTask: Boolean = true) : AgentCommand

Execute and arbitrary command / script.

Link copied to clipboard
data class AgentExecuteTask(val name: String, val startTime: String, var stopTime: String? = null, var active: Boolean = true, var success: Boolean? = null, val args: List<String> = listOf(), var result: String? = null) : AgentTask
Link copied to clipboard
data class AgentExitCommand(val timestamp: Long = System.currentTimeMillis()) : AgentCommand

Power off the agent.

Link copied to clipboard
data class AgentMeasureCommand(val description: String?, val debugMode: Boolean = false) : AgentCommand

Starts a measurement.

Link copied to clipboard
data class AgentMeasurementTask(val name: String = planData.name, val startTime: String, var stopTime: String? = null, var active: Boolean = true, var success: Boolean? = null, val id: String, val path: String, val planData: PlanData, var result: String? = null) : AgentTask

Perform a measurement

Link copied to clipboard
data class AgentPowerOffCommand(val reboot: Boolean = false) : AgentCommand

Power off the agent.

Link copied to clipboard
data class AgentReconfigureCommand(val locateMeasurements: Boolean = true, val explicit: Boolean = true) : AgentCommand

Reconfigure the agent.

Link copied to clipboard
data class AgentReconfigureTask(val name: String, val startTime: String, var stopTime: String? = null, var active: Boolean = true, var success: Boolean? = null, var result: String? = null) : AgentTask
Link copied to clipboard
data class AgentStatus(val startTime: String, val collectorCapabilities: List<CollectorFlag>, val availablePlans: List<PlanEntry>, val currentTime: String, val activeTask: AgentTask?, val collectorTask: AgentCollectionTask?)

Periodic status package from the agent to the service.

Link copied to clipboard
sealed interface AgentTask

Task represents an ongoing or finished task initiated by a command.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
data class CollectorFlags(val node: String, val flags: List<CollectorFlag> = listOf())
Link copied to clipboard
data class CPUSpecs(val coreCount: Int, val vendor: String?, val model: String?, val microcode: String?, val flags: List<String>)

CPU specs from /proc/cpuinfo

Link copied to clipboard
data class Environment(val variables: Map<String, String> = mapOf())

Environment variables.

Link copied to clipboard
data class JsonResponse<T>(val message: String, val result: T? = null)

A response value provided by the external APIs.

Link copied to clipboard
data class KeyValues(val key: String, val values: List<String>)

Front-matter stuff represented as key-value pairs.

Link copied to clipboard
Link copied to clipboard
data class MemorySpecs(val total: String?, val swap: String?)

Memory specs from /proc/meminfo

Link copied to clipboard
data class NodeSpecs(val name: String, val addresses: List<String>, val osArch: String, val cpu: CPUSpecs?, val memory: MemorySpecs?, val systemSpecs: SystemSpecs?, val environment: Environment = Environment(), val units: List<String>, val image: String? = null, val imageFormat: String? = "avif", val description: String? = null)

Represents the top level structure for specifying a node. A node is a computer that can run the PowerGoblin agent, which is the client program that manages the node.

Link copied to clipboard
data class PlanData(val name: String, val author: String, val description: String, val collectors: List<CollectorFlags>, val activeNodes: List<String>, val resourceFilters: List<String>, val planId: String?, val scripts: List<String>, val runs: String, val timeOut: Long)

Describes a measurement plan.

Link copied to clipboard
data class PlanEntry(val path: String, val date: String, val planData: PlanData)

Describes a measurement plan.

Link copied to clipboard

Variables with special meaning.

Link copied to clipboard
data class SystemSpecs(val hostname: String?, val staticHostname: String?, val iconName: String?, val chassis: String?, val deployment: String?, val location: String?, val kernelName: String?, val kernelRelease: String?, val kernelVersion: String?, val operatingSystemPrettyName: String?, val operatingSystemCPEName: String?, val operatingSystemImageId: String?, val operatingSystemImageVersion: String?, val hardwareVendor: String?, val hardwareModel: String?, val hardwareSku: String?, val hardwareVersion: String?, val firmwareVendor: String?, val firmwareVersion: String?, val firmwareDate: Long, val machineId: String?, val bootId: String?)

System specs provided by systemd.

Functions

Link copied to clipboard
Link copied to clipboard