Package-level declarations

Types

Link copied to clipboard
data class ActiveSource(val source: DataSource, val name: String, val description: String? = null) : Comparable<ActiveSource>

Entries for active data sources, i.e. those we want to focus on in the measurement session.

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? = null, val timeOut: Long = 60 * 60L, val interval: String = "0.1", val debugMode: Boolean = false, val test: 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 (collectd).

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 AgentDeleteMeasurementCommand(val target: String, val uniqueId: String? = null) : AgentCommand

Delete a measurement.

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

Determines the collection capabilities of the agent.

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

Download a measurement from an online source. The source URL must start with HTTP/HTTPS and contain a valid zip archive.

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: Path? = 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

Shut down the agent.

Link copied to clipboard
data class AgentMeasureCommand(val description: String? = null, val debugMode: Boolean = false, val remove: 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: Plan, var result: String? = null) : AgentTask

Perform a measurement

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

Power off (reboot=false, default) or reboot (reboot=true) the whole node, including 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. Tasks are executed by the agent and observed by the service instance.

Link copied to clipboard
data class AssociatedDataSource(val dataSource: MeterDataSource, val unit: String)

Nodes consist of functional units (NodeSpecs.units) Some units can be measured with a meter. This structure represents such an association.

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
sealed interface DataSource : Comparable<DataSource>

Represents a data source for the analysis of measurements.

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

Environment variables.

Link copied to clipboard
data class InstanceShortSummary(val sessions: List<SessionEntry>, val meters: List<MeterEntry>, val services: List<Service>, val logFileCount: Long, val busyLogCount: Int, val subsystems: List<SubsystemEntry>, val meterSources: List<MeterSourceEntry>, val nodes: List<NodeEntry>, val name: String, val description: String?)

Summary data structure for the application instance. Contains the mutable features such as session and meter names, uptime, addresses, file count, in addition to the immutable specifications.

Link copied to clipboard
data class InstanceSpecs(val appName: String, val appVersion: String, val launchTime: String)

Immutable specifications for the instance. Used for calculating the instance id.

Link copied to clipboard
data class InstanceSummary(val sessions: List<SessionEntry>, val meters: List<MeterEntry>, val services: List<Service>, val logFileCount: Long, val busyLogCount: Int, val subsystems: List<SubsystemEntry>, val meterSources: List<MeterSourceEntry>, val nodes: List<NodeEntry>, val name: String, val description: String? = null, val tasks: List<TaskDescription>, val webService: Service, val specs: InstanceSpecs, val osData: OSData, val id: String = specs.id(), val configurationDescription: List<String>)

Summary data structure for the application instance. Contains the mutable features such as session and meter names, uptime, addresses, file count, in addition to the immutable specifications.

Link copied to clipboard
data class InterfaceAddresses(val interfaceName: String, val addresses: List<String>)

A simple structure for enumerating the network interfaces.

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>) : Comparable<KeyValues>

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 MeterDataSource(val meter: String, val channel: String) : DataSource
Link copied to clipboard
data class MeterEntry(val id: String, val type: String, val description: String, val present: Boolean, val associatedSession: String?)

A brief entry for enumerating the meters in the instance summary.

Link copied to clipboard
data class MeterSourceEntry(val name: String, val recognizedTypes: List<String>)

A brief entry for enumerating the meter sources in the instance summary.

Link copied to clipboard
data class NodeEntry(val name: String, val associatedDataSources: List<String>, val isController: Boolean, val hasAgent: Boolean)

A brief entry for enumerating the nodes in the instance summary.

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 NodeSummaries(val summaries: List<NodeSummary>)

A collection of node summaries.

Link copied to clipboard
data class NodeSummary(val specs: NodeSpecs, val associatedDataSources: List<AssociatedDataSource>, val isController: Boolean, val hasAgent: Boolean, val status: AgentStatus? = null, val messages: String = "", val queueSize: Int = 0, val timestamp: Long = 0)

A snapshot of the live node state.

Link copied to clipboard
data class OSData(val loadAvg: Double = 0.0, val totalMemory: Long = 0, val freeMemory: Long? = 0)

Operating system and background server related specs / stats.

Link copied to clipboard
data class Plan(val name: String, val author: String, val description: String, val activeChannels: List<ActiveSource>, val activeResources: List<ActiveSource>, val collectors: List<CollectorFlags>, val activeNodes: List<String>, val resourceFilters: List<String>, val planId: String?, val initializationStrategy: SessionInitializationStrategy, val scripts: List<String>, val runs: String, val timeOut: Long, val calibrationTargets: List<CalibrationTarget>, val calibrationDelta: Double?, val calibrationThreshold: Double?, val units: List<String>, val excludeUnits: List<String>)

Describes a measurement plan.

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

Describes a measurement plan.

Link copied to clipboard
class PlanException(message: String) : Exception
Link copied to clipboard
data class ResourceDataSource(val unit: String, val resource: String) : DataSource

Represents a logged resource source.

Link copied to clipboard
data class Service(val name: String, val addresses: List<ServiceAddress>, val status: String? = null)

A simple structure for enumerating services provided by an instance.

Link copied to clipboard
data class ServiceAddress(val host: String, val port: Int, val interfaceName: String, val qrCodeApi: String? = null)

A simple structure for enumerating address-port-interface triples.

Link copied to clipboard
data class SessionEntry(val id: Int, val name: String)

A brief entry for enumerating the sessions in the instance summary.

Link copied to clipboard

Variables with special meaning.

Link copied to clipboard
data class SubsystemEntry(val name: String, val status: String)

A brief entry for enumerating the subsystems in the instance summary.

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.

Link copied to clipboard
data class TaskDescription(val id: Int, val name: String, val description: String? = null, val status: TaskStatus)

Structure representing an asynchronous task.

Link copied to clipboard
data class TaskFail(val result: String, val duration: Long? = null) : TaskStatus
Link copied to clipboard
data class TaskRunning(val status: String? = null) : TaskStatus
Link copied to clipboard
sealed class TaskStatus

The status of the task.

Link copied to clipboard
data class TaskSuccess(val result: String, val duration: Long? = null) : TaskStatus
Link copied to clipboard
data class Variables(val values: List<KeyValues> = listOf())

A container for variables.