Schema Overview
The API is organized into three main operation types:- Query - Read current state and metrics
- Mutation - Modify configuration (not currently supported)
- Subscription - Real-time streaming data
Root Query Type
health
Returns true to indicate the GraphQL server is reachable.
Type: Boolean!
Example:
components
Returns all configured components (sources, transforms, and sinks).
Type: ComponentsConnection!
Arguments:
first: Int- Number of items to return from the startlast: Int- Number of items to return from the endafter: String- Cursor to start frombefore: String- Cursor to end atfilter: ComponentsFilter- Filter components by criteriasortBy: ComponentsSort- Sort order
hostMetrics
Requires the
sources-host_metrics feature to be enabled at compile time.HostMetrics!
Example:
Component Types
Component Interface
All components implement this interface.
Fields:
componentId: String!- Unique component identifiercomponentType: String!- Component type (e.g., “demo_logs”, “remap”, “elasticsearch”)
SourceTransformSink
Source Type
Represents a data source component.
Fields:
componentId: String!- Component identifiercomponentType: String!- Source typeoutputType: String!- Output data type (“log”, “metric”, or “trace”)outputs: [Output!]!- Output connections to other components
Transform Type
Represents a data transformation component.
Fields:
componentId: String!- Component identifiercomponentType: String!- Transform typeinputs: [String!]!- Input component IDsoutputs: [Output!]!- Output connections
Sink Type
Represents a data sink component.
Fields:
componentId: String!- Component identifiercomponentType: String!- Sink typeinputs: [String!]!- Input component IDs
Filter Types
ComponentsFilter
Filter components by various criteria.
Fields:
componentId: [StringFilter!]- Filter by component IDcomponentKind: [EqualityFilter<ComponentKind>!]- Filter by component kindor: [ComponentsFilter!]- Combine filters with OR logic
StringFilter
Filter string fields.
Fields:
equals: String- Exact matchnotEquals: String- Does not matchcontains: String- Contains substringnotContains: String- Does not contain substringstartsWith: String- Starts with prefixendsWith: String- Ends with suffix
ComponentKind Enum
Component type categories.
Values:
SOURCE- Data sourceTRANSFORM- Data transformationSINK- Data destination
Sort Types
ComponentsSort
Sort components by field and direction.
Fields:
field: ComponentsSortFieldName!- Field to sort bydirection: SortDirection!- Sort direction
ComponentsSortFieldName Enum
Fields available for sorting.
Values:
COMPONENT_KEY- Sort by component IDCOMPONENT_KIND- Sort by component type
SortDirection Enum
Sort direction.
Values:
ASC- Ascending orderDESC- Descending order
Pagination
ComponentsConnection
Relay-style connection type for pagination.
Fields:
pageInfo: PageInfo!- Pagination informationedges: [ComponentEdge!]!- List of edgesnodes: [Component!]!- Direct access to nodes
PageInfo
Pagination metadata.
Fields:
hasNextPage: Boolean!- More items availablehasPreviousPage: Boolean!- Previous items availablestartCursor: String- Cursor of first itemendCursor: String- Cursor of last item
ComponentEdge
Edge in the connection.
Fields:
cursor: String!- Cursor for this edgenode: Component!- The component
Subscription Type
Subscriptions provide real-time streaming updates.heartbeat
Periodic timestamp updates.
Arguments:
interval: Int = 1000- Milliseconds between updates (10-60000)
Heartbeat!
Example:
uptime
Vector uptime in seconds.
Arguments:
interval: Int = 1000- Milliseconds between updates (10-60000)
Uptime!
Example:
componentReceivedEventsTotals
Total events received by each component.
Arguments:
interval: Int = 1000- Milliseconds between updates (10-60000)
[ComponentReceivedEventsTotal!]!
Example:
componentReceivedEventsThroughputs
Events received per second by each component.
Arguments:
interval: Int = 1000- Milliseconds between updates (10-60000)
[ComponentReceivedEventsThroughput!]!
Example:
componentSentEventsTotals
Total events sent by each component.
Arguments:
interval: Int = 1000- Milliseconds between updates (10-60000)
[ComponentSentEventsTotal!]!
Example:
componentSentEventsThroughputs
Events sent per second by each component.
Arguments:
interval: Int = 1000- Milliseconds between updates (10-60000)
[ComponentSentEventsThroughput!]!
Example:
componentReceivedBytesTotals
Total bytes received by each component.
Arguments:
interval: Int = 1000- Milliseconds between updates (10-60000)
[ComponentReceivedBytesTotal!]!
Example:
componentSentBytesTotals
Total bytes sent by each component.
Arguments:
interval: Int = 1000- Milliseconds between updates (10-60000)
[ComponentSentBytesTotal!]!
Example:
componentErrorsTotals
Total errors by component.
Arguments:
interval: Int = 1000- Milliseconds between updates (10-60000)
[ComponentErrorsTotal!]!
Example:
componentAllocatedBytes
Memory allocated by each component.
Arguments:
interval: Int = 1000- Milliseconds between updates (10-60000)
[ComponentAllocatedBytes!]!
Example:
Metric Types
Heartbeat
Fields:
utc: DateTime!- UTC timestamp
Uptime
Fields:
seconds: Float!- Vector uptime in secondstimestamp: DateTime- Metric timestamp
ComponentReceivedEventsTotal
Fields:
componentId: String!- Component identifiermetric: ReceivedEventsTotal!- Metric data
ReceivedEventsTotal
Fields:
receivedEventsTotal: Float!- Total events receivedtimestamp: DateTime- Metric timestamp
ComponentReceivedEventsThroughput
Fields:
componentId: String!- Component identifierthroughput: Int!- Events per second
ComponentSentEventsTotal
Fields:
componentId: String!- Component identifiermetric: SentEventsTotal!- Metric data
SentEventsTotal
Fields:
sentEventsTotal: Float!- Total events senttimestamp: DateTime- Metric timestamp
ComponentSentEventsThroughput
Fields:
componentId: String!- Component identifierthroughput: Int!- Events per second
ComponentReceivedBytesTotal
Fields:
componentId: String!- Component identifiermetric: ReceivedBytesTotal!- Metric data
ReceivedBytesTotal
Fields:
receivedBytesTotal: Float!- Total bytes receivedtimestamp: DateTime- Metric timestamp
ComponentSentBytesTotal
Fields:
componentId: String!- Component identifiermetric: SentBytesTotal!- Metric data
SentBytesTotal
Fields:
sentBytesTotal: Float!- Total bytes senttimestamp: DateTime- Metric timestamp
ComponentErrorsTotal
Fields:
componentId: String!- Component identifiermetric: ErrorsTotal!- Metric data
ErrorsTotal
Fields:
errorsTotal: Float!- Total errorstimestamp: DateTime- Metric timestamp
ComponentAllocatedBytes
Fields:
componentId: String!- Component identifiermetric: AllocatedBytes!- Metric data
AllocatedBytes
Fields:
allocatedBytes: Float!- Bytes allocatedtimestamp: DateTime- Metric timestamp
Host Metrics Types
HostMetrics
Fields:
cpu: HostCpuMetrics!- CPU metricsmemory: HostMemoryMetrics!- Memory metricsdisk: HostDiskMetrics!- Disk metricsnetwork: HostNetworkMetrics!- Network metrics
HostCpuMetrics
Fields:
cpuSecondsTotal: Float!- Total CPU seconds
HostMemoryMetrics
Fields:
memoryTotalBytes: Float!- Total memorymemoryUsedBytes: Float!- Used memorymemoryAvailableBytes: Float!- Available memory
HostDiskMetrics
Fields:
diskTotalBytes: Float!- Total disk spacediskUsedBytes: Float!- Used disk space
HostNetworkMetrics
Fields:
networkReceiveBytesTotal: Float!- Total bytes receivednetworkTransmitBytesTotal: Float!- Total bytes transmitted
Complete Example
Here’s a comprehensive query that demonstrates multiple features:Schema Introspection
You can introspect the full schema using:Next Steps
API Overview
Learn how to enable and configure the API
CLI Top Command
Use the built-in monitoring dashboard
Monitoring Guide
Set up comprehensive monitoring