LogoLogo
StackState.comDownloadSupportExplore playground
StackState v5.1
StackState v5.1
  • Welcome to the StackState docs!
  • StackState self-hosted v5.1 docs
  • Getting Started
  • 🚀Setup
    • Install StackState
      • Requirements
      • Kubernetes / OpenShift
        • Kubernetes install
        • OpenShift install
        • Required Permissions
        • Non-high availability setup
        • Override default configuration
        • Configure storage
        • Configure Ingress
        • Install from custom image registry
        • Migrate from Linux install
      • Linux
        • Before you install
        • Download
        • Install StackState
        • Install with production configuration
        • Install with development configuration
        • Install with POC configuration
        • Set up a reverse proxy
        • Set up TLS without reverse proxy
      • Initial run guide
      • Troubleshooting
    • Upgrade StackState
      • Steps to upgrade
      • Version specific upgrade instructions
      • StackPack versions
      • StackState release notes
    • StackState Agent
      • About StackState Agent V3
      • Docker
      • Kubernetes / OpenShift
      • Linux
      • Windows
      • Advanced Agent configuration
      • Use an HTTP/HTTPS proxy
      • Agent V1 (legacy)
      • Migrate Agent V1 to Agent V2
        • Linux
        • Docker
    • StackState CLI
      • CLI: sts
      • CLI: stac (deprecated)
      • Comparison between CLIs
    • Data management
      • Backup and Restore
        • Kubernetes backup
        • Linux backup
        • Configuration backup
      • Data retention
      • Clear stored data
  • 👤Use
    • Concepts
      • The 4T data model
      • Components
      • Relations
      • Health state
      • Layers, Domains and Environments
      • Perspectives
      • Anomaly detection
      • StackState architecture
    • StackState UI
      • Explore mode
      • Filters
      • Views
        • About views
        • Configure the view health
        • Create and edit views
        • Visualization settings
      • Perspectives
        • Topology Perspective
        • Events Perspective
        • Traces Perspective
        • Metrics Perspective
      • Timeline and time travel
      • Analytics
      • Keyboard shortcuts
    • Checks and monitors
      • Checks
      • Add a health check
      • Anomaly health checks
      • Monitors
      • Manage monitors
    • Problem analysis
      • About problems
      • Problem lifecycle
      • Investigate a problem
      • Problem notifications
    • Metrics
      • Telemetry streams
      • Golden signals
      • Top metrics
      • Add a telemetry stream
      • Browse telemetry
      • Set telemetry stream priority
    • Events
      • About events
      • Event notifications
      • Manage event handlers
    • Glossary
  • 🧩StackPacks
    • About StackPacks
    • Add-ons
      • Autonomous Anomaly Detector
      • Health Forecast
    • Integrations
      • About integrations
      • 💠StackState Agent V2
      • 💠AWS
        • AWS
        • AWS ECS
        • AWS X-ray
        • StackState/Agent IAM role: EC2
        • StackState/Agent IAM role: EKS
        • Policies for AWS
        • AWS (legacy)
        • Migrate AWS (legacy) to AWS
      • 💠Dynatrace
      • 💠Kubernetes
      • 💠OpenShift
      • 💠OpenTelemetry
        • About instrumentations
        • AWS NodeJS Instrumentation
        • Manual Instrumentation
          • Prerequisites
          • Tracer and span mappings
          • Relations between components
          • Span health state
          • Merging components
          • Code examples
      • 💠ServiceNow
      • 💠Slack
      • 💠Splunk
        • Splunk
        • Splunk Events
        • Splunk Health
        • Splunk Metrics
        • Splunk Topology
      • 💠VMWare vSphere
      • Apache Tomcat
      • Azure
      • Cloudera
      • Custom Synchronization
      • DotNet APM
      • Elasticsearch
      • Humio
      • Java APM
      • JMX
      • Logz.io
      • MySQL
      • Nagios
      • OpenMetrics
      • PostgreSQL
      • Prometheus
      • SAP
      • SCOM
      • SolarWinds
      • Static Health
      • Static Topology
      • Traefik
      • WMI
      • Zabbix
    • Develop your own StackPacks
  • 🔧Configure
    • Topology
      • Component actions
      • Identifiers
      • Topology naming guide
      • Topology sources
      • Create a topology manually
      • Configure topology synchronizations
      • Enable email event notifications
      • Send topology data over HTTP
      • Set the topology filtering limit
      • Use a proxy for event handlers
      • Use tags
      • Tune topology synchronization
      • Debug topology synchronization
    • Telemetry
      • Add telemetry during topology synchronization
      • Data sources
        • Elasticsearch
        • Prometheus mirror
      • Send events over HTTP
      • Send metrics data over HTTP
      • Set the default telemetry interval
      • Debug telemetry synchronization
    • Traces
      • Set up traces
      • Advanced configuration for traces
    • Health
      • Health synchronization
      • Send health data over HTTP
        • Send health data
        • Repeat Snapshots JSON
        • Repeat States JSON
        • Transactional Increments JSON
      • Debug health synchronization
    • Anomaly Detection
      • Export anomaly feedback
      • Scale the AAD up and down
      • The AAD status UI
    • Security
      • Authentication
        • Authentication options
        • File based
        • LDAP
        • Open ID Connect (OIDC)
        • KeyCloak
        • Service tokens
      • RBAC
        • Role-based Access Control
        • Permissions
        • Roles
        • Scopes
        • Subjects
      • Secrets management
      • Self-signed certificates
      • Set up a security backend for Linux
      • Set up a security backend for Windows
    • Logging
      • Kubernetes logs
      • Linux logs
      • Enable logging for functions
  • 📖Develop
    • Developer guides
      • Agent checks
        • About Agent checks
        • Agent check API
        • Agent check state
        • How to develop Agent checks
        • Connect an Agent check to StackState
      • Custom functions and scripts
        • StackState functions
        • Check functions
        • Component actions
        • Event handler functions
        • ID extractor functions
        • Mapping functions
        • Monitor functions
        • Propagation functions
        • Template functions
        • View health state configuration functions
      • Custom Synchronization StackPack
        • About the Custom Synchronization StackPack
        • How to customize elements created by the Custom Synchronization StackPack
        • How to configure a custom synchronization
      • Integrate external services
      • Mirroring Telemetry
      • Monitors
        • Create monitors
        • Monitor STJ file format
      • StackPack development
        • How to create a StackPack
        • Packaging
        • How to get a template file
        • How to make a multi-instance StackPack
        • Prepare a multi-instance provisioning script
        • Upload a StackPack file
        • Prepare a shared template
        • Customize a StackPack
        • Prepare instance template files
        • Prepare a StackPack provisioning script
        • Resources in a StackPack
        • StackState Common Layer
      • Synchronizations and templated files
    • Reference
      • StackState OpenAPI docs
      • StackState Template JSON (STJ)
        • Using STJ
        • Template functions
      • StackState Markup Language (STML)
        • Using STML
        • STML Tags
      • StackState Query Language (STQL)
      • StackState Scripting Language (STSL)
        • Scripting in StackState
        • Script result: Async
        • Script result: Streaming
        • Time in scripts
        • Script APIs
          • Async - script API
          • Component - script API
          • HTTP - script API
          • Prediction - script API
          • StackPack - script API
          • Telemetry - script API
          • Time - script API
          • Topology - script API
          • UI - script API
          • View - script API
    • Tutorials
      • Create a simple StackPack
      • Push data to StackState from an external system
      • Send events to StackState from an external system
      • Set up a mirror to pull telemetry data from an external system
Powered by GitBook
LogoLogo

Legal notices

  • Privacy
  • Cookies
  • Responsible disclosure
  • SOC 2/SOC 3
On this page
  • Overview
  • StackState Agent types
  • Agent
  • Checks Agent
  • Cluster Agent
  • Setup
  • Supported Kubernetes versions
  • Install
  • Helm chart values
  • Upgrade
  • Configure
  • Advanced Agent configuration
  • External integration configuration
  • Commands
  • Agent and Cluster Agent pod status
  • Agent check status
  • Troubleshooting
  • Log files
  • Debug mode
  • Support knowledge base
  • Uninstall
  • See also
  1. Setup
  2. StackState Agent

Kubernetes / OpenShift

StackState Self-hosted v5.1.x

PreviousDockerNextLinux

Last updated 1 year ago

Overview

StackState Agent V3

To retrieve topology, events and metrics data from a Kubernetes or OpenShift cluster, you will need to have the following installed in the cluster:

  • StackState Agent V3 on each node in the cluster

  • StackState Cluster Agent on one node

  • StackState Checks Agent on one node

  • kube-state-metrics

To integrate with other services, a separate instance of StackState Agent V3 should be deployed on a standalone VM.

StackState Agent types

The Kubernetes and OpenShift integrations collect topology data from Kubernetes and OpenShift clusters respectively, as well as metrics and events. To achieve this, different types of StackState Agent are used:

Component
Pod name

stackstate-agent-node-agent

stackstate-agent-checks-agent

stackstate-agent-cluster-agent

To integrate with other services, a separate instance of the StackState Agent should be deployed on a standalone VM. It isn't currently possible to configure a StackState Agent deployed on a Kubernetes or OpenShift cluster with checks that integrate with other services.

Agent

StackState Agent V3 is deployed as a DaemonSet with one instance on each node in the cluster:

  • Host information is retrieved from the Kubernetes or OpenShift API.

  • Container information is collected from the Docker daemon.

  • Metrics are retrieved from kubelet running on the node and also from kube-state-metrics if this is deployed on the same node.

Checks Agent

The following checks can be configured to run as a cluster check:

  • The kubernetes_state check - this check gathers metrics from kube-state-metrics and sends them to StackState.

  • The Checks Agent is also useful to run checks that don't need to run on a specific node and monitor non-containerized workloads such as:

    • Out-of-cluster datastores and endpoints (for example, RDS or CloudSQL).

    • Load-balanced cluster services (for example, Kubernetes services).

Cluster Agent

StackState Cluster Agent is deployed as a Deployment. There is one instance for the entire cluster:

  • Topology and events data for all resources in the cluster are retrieved from the Kubernetes API

  • Control plane metrics are retrieved from the Kubernetes or OpenShift API

Setup

Supported Kubernetes versions

StackState Agent v3.0.x is supported to monitor the following versions of Kubernetes or OpenShift:

  • Kubernetes:

    • Kubernetes 1.16 - 1.28

    • EKS (with Kubernetes 1.16 - 1.28)

  • OpenShift:

    • OpenShift 4.3 - 4.12

  • Default networking

  • Container runtime:

    • Docker - removed in Kubernetes 1.24

    • containerd - default from Kubernetes 1.24

    • CRI-O

Install

The StackState Agent, Cluster Agent, Checks Agent and kube-state-metrics can be installed together using the StackState Agent Helm Chart:

Online install

The StackState Agent, Cluster Agent, Checks Agent and kube-state-metrics can be installed together using the StackState Agent Helm Chart:

  1. If you don't already have it, you will need to add the StackState helm repository to the local helm client:

     helm repo add stackstate https://helm.stackstate.io
     helm repo update
  2. Deploy the StackState Agent, Cluster Agent, Checks Agent and kube-state-metrics to namespace stackstate using the helm command below.

    • <STACKSTATE_RECEIVER_API_KEY> is set during StackState installation.

    • <STACKSTATE_RECEIVER_API_ADDRESS> is specific to your installation of StackState.

helm upgrade --install \
   --namespace stackstate \
   --create-namespace \
   --set-string 'stackstate.apiKey'='<STACKSTATE_RECEIVER_API_KEY>' \
   --set-string 'stackstate.cluster.name'='<KUBERNETES_CLUSTER_NAME>' \
   --set-string 'stackstate.url'='<STACKSTATE_RECEIVER_API_ADDRESS>' \
   stackstate-agent stackstate/stackstate-agent
helm upgrade --install \
  --namespace stackstate \
  --create-namespace \
  --set-string 'stackstate.apiKey'='<STACKSTATE_RECEIVER_API_KEY>' \
  --set-string 'stackstate.cluster.name'='<OPENSHIFT_CLUSTER_NAME>' \
  --set-string 'stackstate.url'='<STACKSTATE_RECEIVER_API_ADDRESS>' \
  --set 'agent.scc.enabled'=true \
  --set 'kube-state-metrics.podSecurityContext.enabled'=false \
  --set 'kube-state-metrics.containerSecurityContext.enabled'=false \
  stackstate-agent stackstate/stackstate-agent

Air gapped install

If StackState Agent will run in an environment that doesn't have a direct connection to the Internet, the images required to install the StackState Agent, Cluster Agent, Checks Agent and kube-state-metrics can be downloaded and stored in a local system or image registry.

  1. Internet connection required:

    1. In the Helm charts repo, go to the directory stable/stackstate-agent/installation and use the script backup.sh to back up the required images from StackState. The script will pull all images required for the stackstate-agent Helm chart to run, back them up to individual tar archives and add all tars to a single tar.gz archive. The images will be in a tar.gz archive in the same folder as the working directory from where the script was executed. It's advised to run the script from the stable/stackstate-agent/installation directory as this will simplify the process of importing images on the destination system.

      • By default, the backup script will retrieve charts from the StackState chart repository (https://helm.stackstate.io), images are retrieved from the default StackState image registry (quay.io). The script can be executed from the installation directory as simply ./backup.sh.

          Back up helm chart images to a tar.gz archive for easy transport via an external storage device.
        
          Arguments:
              -c : Helm chart (default: stackstate/stackstate-agent)
              -h : Show this help text
              -r : Helm repository (default: https://helm.stackstate.io)
              -t : Dry-run
      • Add the -t (dry-run) parameter to the script to give a predictive output of what work will be performed, for example:

        ./backup.sh -t
        Backing up quay.io/stackstate/stackstate-agent-2:2.19.1 to stackstate/stackstate-agent-2__2.19.1.tar (dry-run)
        Backing up quay.io/stackstate/stackstate-process-agent:4.0.10 to stackstate/stackstate-process-agent__4.0.7.tar (dry-run)
        Backing up quay.io/stackstate/kube-state-metrics:2.3.0-focal-20220316-r61.20220418.2032 to stackstate/kube-state-metrics__2.3.0-focal-20220316-r61.20220418.2032.tar (dry-run)
        Backing up quay.io/stackstate/stackstate-agent-cluster-agent:2.19.1 to stackstate/stackstate-agent-cluster-agent__2.19.1.tar (dry-run)
        Backing up quay.io/stackstate/stackstate-agent-2:2.19.1 to stackstate/stackstate-agent-2__2.19.1.tar (dry-run)
        Images have been backed up to stackstate.tar.gz
  2. No internet connection required:

    1. Transport images to the destination system.

      • Copy the StackState Helm charts repo, including the tar.gz generated by the backup script, to a storage device for transportation. If the backup script was run from the stable/stackstate-agent/installation directory as advised, the tar.gz will be located at stable/stackstate-agent/installation/stackstate.tar.gz.

      • Copy the Helm charts repo and tar.gz from the storage device to a working folder of choice on the destination system.

    2. Import images to the system, and optionally push to a registry.

      • On the destination system, go to the directory in the StackState Helm charts repo that contains both the scripts and the generated tar.gz archive. By default, this will be stable/stackstate-agent/installation.

      • Execute the import.sh script. Note that the import script must be located in the same directory as the tar.gz archive to be imported, the following must be specified:

        • -b - path to the tar.gz to be imported

        • -d - the destination Docker image registry

      • Additional options when running the script:

        • -p - push images to the destination registry. When not specified, images will be imported and tagged, but remain on the local machine.

        • -t - Dry-run. Use to show the work that will be performed without any action being taken.

Example script usage

In the example below, the StackState Agent images will be extracted from the archive stackstate.tar.gz, imported by Docker, and re-tagged to the registry given by the -d flag, in this example, localhost. The -t argument (dry-run) is provided to show the work that will be performed:

./import.sh -b stackstate.tar.gz -d localhost -t

Unzipping archive stackstate.tar.gz
x stackstate/
x stackstate/stackstate-process-agent__4.0.7.tar
x stackstate/stackstate-agent-2__2.19.1.tar
x stackstate/kube-state-metrics__2.3.0-focal-20220316-r61.20220418.2032.tar
x stackstate/stackstate-agent-cluster-agent__2.19.1.tar
Restoring stackstate/kube-state-metrics:2.3.0-focal-20220316-r61.20220418.2032 from kube-state-metrics__2.3.0-focal-20220316-r61.20220418.2032.tar (dry-run)
Imported quay.io/stackstate/kube-state-metrics:2.3.0-focal-20220316-r61.20220418.2032
Tagged quay.io/stackstate/kube-state-metrics:2.3.0-focal-20220316-r61.20220418.2032 as localhost/stackstate/kube-state-metrics:2.3.0-focal-20220316-r61.20220418.2032
Untagged: quay.io/stackstate/kube-state-metrics:2.3.0-focal-20220316-r61.20220418.2032
Restoring stackstate/stackstate-agent-2:2.19.1 from stackstate-agent-2__2.19.1.tar (dry-run)
Imported quay.io/stackstate/stackstate-agent-2:2.19.1
Tagged quay.io/stackstate/stackstate-agent-2:2.19.1 as localhost/stackstate/stackstate-agent-2:2.19.1
Untagged: quay.io/stackstate/stackstate-agent-2:2.19.1
Restoring stackstate/stackstate-agent-cluster-agent:2.19.1 from stackstate-cluster-agent__2.19.1.tar (dry-run)
Imported quay.io/stackstate/stackstate-agent-cluster-agent:2.19.1
Tagged quay.io/stackstate/stackstate-agent-cluster-agent:2.19.1 as localhost/stackstate/stackstate-cluster-agent:2.19.1
Untagged: quay.io/stackstate/stackstate-agent-cluster-agent:2.19.1
Restoring stackstate/stackstate-process-agent:4.0.10 from stackstate-process-agent__4.0.7.tar (dry-run)
Imported quay.io/stackstate/stackstate-process-agent:4.0.10
Tagged quay.io/stackstate/stackstate-process-agent:4.0.10 as localhost/stackstate/stackstate-process-agent:4.0.10
Untagged: quay.io/stackstate/stackstate-process-agent:4.0.10
Images have been imported up to localhost

Install from a custom image registry

Helm chart values

Additional variables can be added to the standard helm command used to deploy the StackState Agent, Cluster Agent, Checks Agent and kube-state-metrics. For example:

stackstate.cluster.authToken

It's recommended to use a stackstate.cluster.authToken in addition to the standard helm chart variables when the StackState Agent is deployed. This is an optional variable, however, if not provided a new, random value will be generated each time a helm upgrade is performed. This could leave some pods in the cluster with an incorrect configuration.

For example:

helm upgrade --install \
  --namespace stackstate \
  --create-namespace \
  --set-string 'stackstate.apiKey'='<STACKSTATE_RECEIVER_API_KEY>' \
  --set-string 'stackstate.cluster.name'='<KUBERNETES_CLUSTER_NAME>' \
  --set-string 'stackstate.cluster.authToken'='<CLUSTER_AUTH_TOKEN>' \
  --set-string 'stackstate.url'='<STACKSTATE_RECEIVER_API_ADDRESS>' \
  stackstate-agent stackstate/stackstate-agent
helm upgrade --install \
  --namespace stackstate \
  --create-namespace \
  --set-string 'stackstate.apiKey'='<STACKSTATE_RECEIVER_API_KEY>' \
  --set-string 'stackstate.cluster.name'='<OPENSHIFT_CLUSTER_NAME>' \
  --set-string 'stackstate.url'='<STACKSTATE_RECEIVER_API_ADDRESS>' \
  --set-string 'global.extraEnv.open.STS_LOG_PAYLOADS'='true' \
  --set 'agent.logLevel'='debug' \
  --set 'agent.scc.enabled'=true \
  --set 'kube-state-metrics.podSecurityContext.enabled'=false \
  --set 'kube-state-metrics.containerSecurityContext.enabled'=false \\
  stackstate-agent stackstate/stackstate-agent

agent.containerRuntime.customSocketPath

It isn't necessary to configure this property if your cluster uses one of the default socket paths (/var/run/docker.sock, /var/run/containerd/containerd.sock or /var/run/crio/crio.sock)

If your cluster uses a custom socket path, you can specify it using the key agent.containerRuntime.customSocketPath. For example:

helm upgrade --install \
--namespace stackstate \
--create-namespace \
--set-string 'stackstate.apiKey'='<STACKSTATE_RECEIVER_API_KEY>' \
--set-string 'stackstate.cluster.name'='<KUBERNETES_CLUSTER_NAME>' \
--set-string 'stackstate.url'='<STACKSTATE_RECEIVER_API_ADDRESS>' \
--set-string 'agent.containerRuntime.customSocketPath'='<CUSTOM_SOCKET_PATH>' \
stackstate-agent stackstate/stackstate-agent

Upgrade

Upgrade Agents

To upgrade the Agents running in your Kubernetes or OpenShift cluster, follow the steps described below.

Redeploy/upgrade Agents with the new stackstate/stackstate-agent chart

The new stackstate/stackstate-agent chart can be used to deploy any version of the Agent. Note that the naming of some values has changed compared to the old stackstate/cluster-agent chart.

  • If you previously deployed the Agent using the new stackstate/stackstate-agent, you can upgrade/redeploy the Agent using the same command used to initially deploy the Agent.

helm upgrade --install \
  --namespace stackstate \
  --create-namespace \
  --set-string 'stackstate.apiKey'='<STACKSTATE_RECEIVER_API_KEY>' \
  --set-string 'stackstate.cluster.name'='<KUBERNETES_CLUSTER_NAME>' \
  --set-string 'stackstate.cluster.authToken'='<CLUSTER_AUTH_TOKEN>' \
  --set-string 'stackstate.url'='<STACKSTATE_RECEIVER_API_ADDRESS>' \
  --values values.yaml \
  stackstate-agent stackstate/stackstate-agent
helm upgrade --install \
  --namespace stackstate \
  --create-namespace \
  --set-string 'stackstate.apiKey'='<STACKSTATE_RECEIVER_API_KEY>' \
  --set-string 'stackstate.cluster.name'='<OPENSHIFT_CLUSTER_NAME>' \
  --set-string 'stackstate.url'='<STACKSTATE_RECEIVER_API_ADDRESS>' \
  --set-string 'global.extraEnv.open.STS_LOG_PAYLOADS'='true' \
  --set 'agent.logLevel'='debug' \
  --set 'agent.scc.enabled'=true \
  --set 'kube-state-metrics.podSecurityContext.enabled'=false \
  --set 'kube-state-metrics.containerSecurityContext.enabled'=false \
  --values values.yaml \
  stackstate-agent stackstate/stackstate-agent

Redeploy/upgrade Agents with the old stackstate/cluster-agent chart

The stackstate/cluster-agent chart is being deprecated and will no longer be supported.

Upgrade Helm chart

The stackstate/cluster-agent chart is being deprecated and will no longer be supported. It has been replaced by the new stackstate/stackstate-agent chart.

The naming of some values has changed in the new chart. If you previously deployed the Agent using the stackstate/cluster-agent, follow the steps below to update the values.yaml file and redeploy the Agent with the new stackstate/stackstate-agent chart:

  1. Backup the values.yaml file that was used to deploy with the old stackstate/cluster-agent chart.

  2. Copy of the values.yaml file and update the following values in the new file. This will allow you to re-use the previous values while ensuring compatibility with the new chart:

    • clusterChecks has been renamed to checksAgent - the checksAgent now runs by default. The checksAgent section is now only required if you want to disable the Checks Agent.

    • agent has been renamed to nodeAgent.

    • The kubernetes_state check now runs in the Checks Agent by default, this no longer needs to be configured on default installations.

  3. Uninstall the StackState Cluster Agent and the StackState Agent from your Kubernetes or OpenShift cluster, using a Helm uninstall:

    helm uninstall <release_name> --namespace <namespace>
    
    # If you used the standard install command provided when you installed the StackPack
    helm uninstall stackstate-agent --namespace stackstate
  4. Redeploy the cluster_agent using the updated values.yaml file created in step 2 and the new stackstate/stackstate-agent chart:

helm upgrade --install \
  --namespace stackstate \
  --create-namespace \
  --set-string 'stackstate.apiKey'='<STACKSTATE_RECEIVER_API_KEY>' \
  --set-string 'stackstate.cluster.name'='<KUBERNETES_CLUSTER_NAME>' \
  --set-string 'stackstate.cluster.authToken'='<CLUSTER_AUTH_TOKEN>' \
  --set-string 'stackstate.url'='<STACKSTATE_RECEIVER_API_ADDRESS>' \
  --values values.yaml \
  stackstate-agent stackstate/stackstate-agent
helm upgrade --install \
  --namespace stackstate \
  --create-namespace \
  --set-string 'stackstate.apiKey'='<STACKSTATE_RECEIVER_API_KEY>' \
  --set-string 'stackstate.cluster.name'='<OPENSHIFT_CLUSTER_NAME>' \
  --set-string 'stackstate.url'='<STACKSTATE_RECEIVER_API_ADDRESS>' \
  --set-string 'global.extraEnv.open.STS_LOG_PAYLOADS'='true' \
  --set 'agent.logLevel'='debug' \
  --set 'agent.scc.enabled'=true \
  --set 'kube-state-metrics.podSecurityContext.enabled'=false \
  --set 'kube-state-metrics.containerSecurityContext.enabled'=false \
  --values values.yaml \
  stackstate-agent stackstate/stackstate-agent

Comparison - OLD values.yaml and NEW values.yaml

The old stackstate/cluster-agent chart used to be the Agent has been replaced by the new stackstate/stackstate-agent chart. The naming of some values has changed in the new chart. If you were previously deploying the Agent with the old stackstate/cluster-agent and a values.yaml file, you should update your values.yaml to match the new naming.

stackstate/cluster-agent
stackstate/stackstate-agent
Changes in NEW chart

OLD chart (being deprecated)

NEW chart

It's advised to use the NEW stackstate/stackstate-agent chart.

clusterChecks

checksAgent

Section renamed and enabled by default.

agent

nodeAgent

Section renamed.

In addition to these changes, the kubernetes_state check runs by default in the Checks Agent when using the new chart (stackstate/stackstate-agent). This no longer needs to be configured on default installations.

Below is an example comparing the values.yaml required by the new chart (stackstate/stackstate-agent) and the old chart (stackstate/cluster-agent) to deploy the Agent with the following configuration:

  • Checks Agent enabled

  • kubernetes_state check running in the Checks Agent

  • AWS check running in the Checks Agent

# checksAgent enabled by default
# (Called clusterChecks in the old stackstate/cluster-agent chart)
# kubernetes_state check disabled by default on regular Agent pods.
clusterAgent:
 config:
   override:
   # kubernetes_state check enabled by default for the Checks Agent.
   # Define the AWS check for the Checks Agent.
   - name: conf.yaml
     path: /etc/stackstate-agent/conf.d/aws_topology.d
     data: |
       cluster_check: true
       init_config:
         aws_access_key_id: ''
         aws_secret_access_key: ''
         external_id: uniquesecret!1
         # full_run_interval: 3600
       instances:
       - role_arn: arn:aws:iam::123456789012:role/StackStateAwsIntegrationRole
           regions:
           - global
           - eu-west-1
           collection_interval: 60
# Enable clusterChecks functionality and the clustercheck pods.
# (Called checksAgent in the new stackstate/stackstate-agent chart)
clusterChecks:
 enabled: true
# Disable the kubernetes_state check on regular Agent pods.
agent:
 config:
   override:
   - name: auto_conf.yaml
     path: /etc/stackstate-agent/conf.d/kubernetes_state.d
     data: |
clusterAgent:
 config:
   override:
   # Define the kubernetes_state check for clusterChecks Agents.
   - name: conf.yaml
     path: /etc/stackstate-agent/conf.d/kubernetes_state.d
     data: |
       cluster_check: true
       init_config:
       instances:
         - kube_state_url: http://YOUR_KUBE_STATE_METRICS_SERVICE_NAME:8080/metrics
   # Define the AWS check for clusterChecks Agents.
   - name: conf.yaml
     path: /etc/stackstate-agent/conf.d/aws_topology.d
     data: |
       cluster_check: true
       init_config:
         aws_access_key_id: ''
         aws_secret_access_key: ''
         external_id: uniquesecret!1
         # full_run_interval: 3600
       instances:
       - role_arn: arn:aws:iam::123456789012:role/StackStateAwsIntegrationRole
           regions:
           - global
           - eu-west-1
           collection_interval: 60

Configure

Advanced Agent configuration

External integration configuration

Commands

Agent and Cluster Agent pod status

To check the status of the Kubernetes or OpenShift integration, check that the StackState Cluster Agent (cluster-agent) pod, StackState Checks Agent pod (checks-agent) and all of the StackState Agent (node-agent) pods have status READY.

❯ kubectl get deployment,daemonset --namespace stackstate

NAME                                                 READY   UP-TO-DATE   AVAILABLE   AGE
deployment.apps/stackstate-agent-cluster-agent       1/1     1            1           5h14m
deployment.apps/stackstate-agent-checks-agent        1/1     1            1           5h14m
NAME                                                 DESIRED   CURRENT   READY   UP-TO-DATE   AVAILABLE   NODE SELECTOR   AGE
daemonset.apps/stackstate-agent-node-agent           10        10        10      10           10          <none>          5h14m

Agent check status

To find the status of an Agent check:

  1. Find the Agent pod that is running on the node where you would like to find a check status:

    kubectl get pod --output wide
  2. Run the command:

    kubectl exec <agent-pod-name> -n <agent-namespace> -- Agent status
  3. Look for the check name under the Checks section.

Troubleshooting

Log files

Logs for the Agent can be found in the agent pod, where the StackState Agent is running.

Debug mode

By default, the log level of the Agent is set to INFO. To assist in troubleshooting, the Agent log level can be set to DEBUG. This will enable verbose logging and all errors encountered will be reported in the Agent log files.

  • To set the log level to DEBUG for an Agent running on Kubernetes or OpenShift, set 'agent.logLevel'='debug' in the helm command when deploying the Agent.

  • To also include the topology/telemetry payloads sent to StackState in the Agent log, set --set-string 'global.extraEnv.open.STS_LOG_PAYLOADS'='true'.

For example:

helm upgrade --install \
   --namespace stackstate \
   --create-namespace \
   --set-string 'stackstate.apiKey'='<STACKSTATE_RECEIVER_API_KEY>' \
   --set-string 'stackstate.cluster.name'='<KUBERNETES_CLUSTER_NAME>' \
   --set-string 'stackstate.url'='<STACKSTATE_RECEIVER_API_ADDRESS>' \
   --set-string 'global.extraEnv.open.STS_LOG_PAYLOADS'='true' \
   --set 'agent.logLevel'='debug' \
   stackstate-agent stackstate/stackstate-agent

Support knowledge base

Uninstall

To uninstall the StackState Cluster Agent and the StackState Agent from your Kubernetes or OpenShift cluster, run a Helm uninstall:

helm uninstall <release_name> --namespace <namespace>

# If you used the standard install command provided when you installed the StackPack
helm uninstall stackstate-agent --namespace stackstate

See also

The StackState Checks Agent is an additional StackState Agent V3 pod that will run the cluster checks that are configured on the .

The

Cluster checks configured here are run by the deployed pod.

- charts are retrieved from the default StackState chart repository (https://helm.stackstate.io), images are retrieved from the default StackState image registry (quay.io).

- images are retrieved from a local system or registry.

- images are retrieved from a configured image registry.

For details see .

Note that can be added to the standard helm command.

Download or clone the StackState Helm charts repo from GitHub:

If required, the images required to install the StackState Agent, Cluster Agent, Checks Agent and kube-state-metrics can be served from a custom image registry. To do this, follow the instructions to .

It's recommended to .

If you use a custom socket path, .

Details of all available helm chart values can be found in the .

If this is the first time you will use the new stackstate/stackstate-agent chart to deploy the Agent, follow the instructions to .

It's recommended that you .

If you need to redeploy the Agent using the old stackstate/cluster-agent chart, refer to the .

For an example of the changes required to the values.yaml file, see the

StackState Agent V3 can be configured to reduce data production, tune the process blacklist, or turn off specific features when not needed. The required settings are described in detail on the page .

To integrate with other external services, a separate instance of the should be deployed on a standalone VM. Other than and , it isn't currently possible to configure a StackState Agent deployed on a Kubernetes or OpenShift cluster with checks that integrate with other services.

Troubleshooting steps for any known issues can be found in the .

🚀
Kubernetes integration kubernetes_state check
OpenShift integration kubernetes_state check
https://github.com/StackVista/helm-charts
install from a custom image registry
Agent Helm Chart documentation (github.com)
StackState v5.0 documentation (docs.stackstate.com/v/5.0/)
advanced Agent configuration
StackState support knowledge base
StackState Agent Helm Chart documentation (github.com)
About the StackState Agent
Advanced Agent configuration
Kubernetes StackPack
OpenShift StackPack
StackState Cluster Agent
StackState Checks Agent
Online install
Air gapped install
Install from a custom image registry
additional optional configuration
use a stackstate.cluster.authToken
set the agent.containerRuntime.customSocketPath
upgrade the Helm chart
upgrade to the new stackstate/stackstate-agent chart
comparison - OLD values.yaml and NEW values.yaml
Node Agent
Checks Agent
Cluster Agent
StackState Agent
kubernetes_state check
StackState Receiver API
StackState Agents on Kubernetes
AWS check
AWS check