Edit Namespaces
Edit Namespaces
You can modify the namespaces by using nsToMonitorRegex
field.
The following are common namespace behavior scenarios with nsToMonitorRegex
-
After initial registration, at every subsequent minute the agent checks for the
nsToMonitorRegex
field to match the namespaces. If there isnsToExcludeRegex
mentioned, those namespaces are excluded from the monitored namespaces. -
If a namespace configuration is to be monitored or ignored from the Controller, it takes precedence over the agent configuration (Cluster Agent YAML file). Therefore, if a namespace satisfies the regular expression that is configured for
nsToExcludeRegex
, but the Controller configuration includes that namespace under monitored namespaces, then the namespace is monitored.To exclude this namespace from being monitored, you must delete the namespace in the Controller configuration. In this scenario, where there is a conflict between the agent configuration and the Controller configuration, the addition or removal of the relevant namespace from the Cluster Agent configuration does not have any effect.
-
If the Cluster Agent is restarted, the
nsToMonitorRegex
andnsToExcludeRegex
fields are read from the agent configuration file along with the namespaces configured in the Controller. -
If the Controller is restarted, the monitored and ignored namespaces included in the Controller configuration are retained and reapplied along with the agent configuration.
-
If both the Cluster Agent and the Controller are restarted at the same time, the
nsToMonitorRegex
andnsToExcludeRegex
fields are read from the agent configuration file. The namespaces to be monitored are determined based on the agent configuration. -
If a new namespace matching the configured regex is added, the namespace is monitored without any additional configuration. Similarly, when a namespace does not match the configured regex, it is not monitored.
You can modify namespaces in a Cluster by:
-
Updating Namespaces in the Cluster Agent Configuration File- Modify the
nsToMonitorRegex
field in the cluster-agent.yaml file before deploying the Cluster Agent. You can update thensToMonitorRegex
field in the cluster-agent.yaml file even after the registration. -
Editing Namespaces in the User Interface- Edit namespaces after you deploy the Cluster Agent. Once deployed, the cluster is listed under Splunk AppDynamics Agents or Cluster Agents. Open the Splunk AppDynamics browser-based configuration user interface and edit namespaces.
Update Namespaces in the Cluster Agent Configuration File
To update namespaces in a cluster, use the nsToMonitorRegex
cluster-agent.yaml
Updating namespaces using the nsToMonitorRegex
changes the currently monitored namespaces. The scenarios are mentioned at Edit Namespaces.
If the Cluster Agent pod unexpectedly restarts, the namespaces stored in the Controller take precedence and are preserved. See Troubleshoot the Cluster Agent.
To update namespaces:
- Open the
cluster-agent.yaml
file in a text editor. -
To specify namespaces based on regular expressions, include the
nsToMonitorRegex
nsToMonitorRegex: <regular expression> nsToExcludeRegex: <regular expression> #This is an optional field
-
Verify the list of namespaces. If it is not correct, add or remove namespaces in the cluster-agent.yaml
-
Open a command prompt. To apply the namespaces changes, enter:
kubectl apply -f cluster-agent.yaml
-
To verify that the Splunk AppDynamics Operator registered the monitored namespace value, enter:
kubectl-app describe cm cluster-agent-mon
Edit Namespaces in the User Interface
Once you have deployed the Cluster Agent, the To edit a namespace from the cluster, you must have administrator permissions: Selected namespaces column displays the currently monitored namespaces.
To edit a namespace:
- Double-click a cluster from the list.
- Click Configure
- To modify namespaces, select a namespace by checking the corresponding box.
- Once the desired namespace box is checked, click the arrow to move it to either the Selected namespace table or the Available namespace table.
- Click OK to close the dialog box. These changes take a couple of minutes and the status displays in a banner notification.