You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/community-tutorials.rst
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,4 +10,5 @@ Here are more tutorials from the Robusta community:
10
10
* **Video:** `Twitter challenge - Robusta.dev on 10 nodes <https://www.youtube.com/watch?v=l_zaCaY_wls>`_ by `Nuno Captain Corsair <https://twitter.com/nunixtech>`_
11
11
* `Getting Started with Robusta on Digital Ocean <https://dev.to/heyrutam/getting-started-with-robusta-on-digital-ocean-3g41>`_ by `Rutam Prita Mishra <https://github.com/Rutam21>`_
12
12
* `Getting Started with Robusta on Civo Cloud <https://dev.to/heyrutam/getting-started-with-robusta-on-civo-cloud-5h8f>`_ by `Rutam Prita Mishra <https://github.com/Rutam21>`_
13
-
* `Kubernetes troubleshooting and automation using Robusta <https://xxradar.medium.com/kubernetes-troubleshooting-and-automation-using-robusta-13f113fcdc36>`_ by `Philippe Bogaerts <https://twitter.com/xxradar>`_
13
+
* `Kubernetes troubleshooting and automation using Robusta <https://xxradar.medium.com/kubernetes-troubleshooting-and-automation-using-robusta-13f113fcdc36>`_ by `Philippe Bogaerts <https://twitter.com/xxradar>`_
14
+
* `Enhancing Kubernetes Monitoring Automation with Robusta <https://naren4b.hashnode.dev/enhancing-kubernetes-monitoring-automation-with-robusta>`_ by `Naren P <https://naren4b.hashnode.dev/>`_
Use this endpoint to retrieve an **active count of specific Kubernetes resources** within a namespace. This is the same data displayed in the **Namespaces** tab of the Robusta UI.
664
+
665
+
You can specify exactly which resource kinds you want to query in the request.
666
+
667
+
This API relies on resource types configured in the Robusta UI sink.
668
+
Make sure to configure them as described in :ref:`cb-robusta-ui-sink-namespace-config`.
669
+
670
+
Request Body Schema
671
+
^^^^^^^^^^^^^^^^^^^
672
+
673
+
The request body must include the following fields:
674
+
675
+
.. list-table::
676
+
:widths: 25 10 70 10
677
+
:header-rows: 1
678
+
679
+
* - Field
680
+
- Type
681
+
- Description
682
+
- Required
683
+
* - ``namespace``
684
+
- string
685
+
- The name of the namespace you want to inspect.
686
+
- Yes
687
+
* - ``account_id``
688
+
- string
689
+
- The unique account identifier.
690
+
- Yes
691
+
* - ``cluster_name``
692
+
- string
693
+
- The name of the cluster where the namespace resides.
694
+
- Yes
695
+
* - ``resources``
696
+
- list
697
+
- A list of resource types to count, each including ``kind``, ``apiGroup``, and ``apiVersion``.
698
+
- Yes
699
+
700
+
Each item in the ``resources`` list must include:
701
+
702
+
* ``kind`` (e.g., `Deployments`)
703
+
* ``apiGroup`` (e.g., `apps`, or empty string for core group)
704
+
* ``apiVersion`` (e.g., `v1`, `v2`)
705
+
706
+
Example Request
707
+
^^^^^^^^^^^^^^^^^^^^
708
+
709
+
Here is an example of a ``POST`` request to query the resource count in a namespace:
For in cluster address, use the cluster dns. For example: ``--port-forward --port-forward-namespace argocd --server argocd-server.argocd.svc.cluster.local --insecure --grpc-web``
74
+
Add ``--insecure`` to work with self signed certificates.
75
+
73
76
Change the namespace ``--port-forward-namespace <your_argocd_namespace>`` to the namespace in which your argocd service
Copy file name to clipboardExpand all lines: docs/configuration/sinks/RobustaUI.rst
+40Lines changed: 40 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -60,6 +60,46 @@ To do so, configure a shorter retention period by setting the ``ttl_hours`` in t
60
60
# automatically clean up old clusters in the UI if they are disconnected 12+ hours
61
61
ttl_hours: 12
62
62
63
+
64
+
.. _cb-robusta-ui-sink-namespace-config:
65
+
66
+
Monitoring Specific Resources in Namespaces
67
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
68
+
69
+
By default, the Robusta UI sink discovers the standard resources in all namespaces using the standard discovery interval.
70
+
However, we have a configuration to monitor custom namespaced resources, and an API is exposed via the the Robusta Backend to see how many of each resource you have in a namespace.
71
+
72
+
To configure this, use the ``namespace_discovery_seconds`` and ``namespaceMonitoredResources`` settings in the Robusta UI sink:
73
+
74
+
.. code-block:: bash
75
+
:name: cb-robusta-ui-sink-namespace-config-code
76
+
77
+
sinksConfig:
78
+
- robusta_sink:
79
+
name: robusta_ui_sink
80
+
token: <your-token>
81
+
# how often to re-scan for new namespaces (in seconds)
82
+
namespace_discovery_seconds: 3600
83
+
# what resource types to actively count per namespace
84
+
namespaceMonitoredResources:
85
+
- apiGroup: ""
86
+
apiVersion: "v1"
87
+
kind: "Services"
88
+
- apiGroup: "apps"
89
+
apiVersion: "v1"
90
+
kind: "Deployments"
91
+
- apiGroup: "apps.openshift.io"
92
+
apiVersion: "v1"
93
+
kind: "DeploymentConfig"
94
+
- apiGroup: "batch"
95
+
apiVersion: "v1"
96
+
kind: "CronJob"
97
+
- apiGroup: "networking.k8s.io"
98
+
apiVersion: "v1"
99
+
kind: "Ingress"
100
+
101
+
102
+
63
103
More Information about the UI
64
104
-------------------------------------
65
105
For more information on UI features, view `robusta.dev <https://home.robusta.dev>`_.
0 commit comments