Skip to main content

Node Count

Styra DAS calculates Kubernetes node counts through the following metrics:

  • The node count for a Kubernetes cluster is sampled hourly from data returned by the Styra DAS datasources-agent deployed in the cluster.
  • The node counts displayed on the Workspace Dashboard are the monthly averages of those samples for the last year.
  • The node count displayed in the Usage pane is the trailing average of those samples over the last month.

Node Count through the Styra DAS UI

Workspace Dashboard

Users with any Workspace role can see the Workspace Dashboard upon login. If you do not see the Workspace Dashboard, your tenant may have this feature disabled.

For tenants with Kubernetes systems, the Workspace Dashboard includes a bar graph representing the monthly average node count total of all Kubernetes systems for the last year, including the current calendar month. Hover over a bar representing a month to see the average node count for that month.

Workspace Usage Pane

Use the following steps to view the node count in the Styra DAS UI.

  1. Login to the Styra DAS UI as a user with the WorkspaceAdministrator role.
  2. Click the user icon.
  3. Click Usage.

The bottom of the list displays the the trailing monthly average Kubernetes node count.

Node Count through the Styra DAS API

The following command uses the ShowData API to display the current Kubernetes node count as reported by the Styra DAS datasources-agent for a Kubernetes cluster connected to a system:

curl -X POST -H "Authorization: Bearer ${STYRA_TOKEN}"  -H 'Content-Type: application/json' https://${TENANT}${SYSTEM_ID} -d '{"rego": "count(data.kubernetes.resources.nodes)"}'

Replace ${STYRA_TOKEN}, ${TENANT}, and ${SYSTEM_ID} with your values in the above command.