-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Agent not Sending Metrics to Instance Manager #6148
Conversation
Signed-off-by: Saed SayedAhmed <[email protected]>
Hi @saedx1 |
includes |
@vepatel Yes, I am using this with NAP-WAF. Again, feel free to test metrics without the change in this PR, but I cannot get any metrics with @pdabelf5 That is also fine, but the documentation does not mention anything but Also, the chart makes it hard to do any custom changes to agent configs as far as I can tell (without kubectl patch or something of the like). |
@saedx1 are none of the metrics showing up without your changes? |
@vepatel That is correct. Nginx+ Instance Counts + Security Monitoring are working fine, but not instance/host metrics (CPU Utilization, Memory Usage, Status Code Counts, ...) |
@saedx1 that seems like correct, NIC only does SM at the moment by default |
@vepatel I am not sure I get your point. I do get instance metrics if I do the change suggested in this PR. So clearly it is doable (unless you believe that should not work with NIC). |
@saedx1 have you tried the helm value As @vepatel mentioned, what is included by default is the configuration required to support NIC + Security Monitoring. The custom configmap is there to allow you to enable additional features of NGINX Agent. |
@pdabelf5 Got it. Apologies, I realize this is a PR, but hopefully the answer to this question would lead to the end of the discussion. |
Hi @saedx1, you're indeed free to bring in any valid configmap for
We certainly do not put any restriction but again NIC's default use-case with Agent is Security Monitoring as described here. |
yes, the default is there to support Security Monitoring, the custom configmap is there to allow the user to customise the agent configuration to their needs. |
Agent v2 is part of the NIC + WAF image. By default Agent v2 also requires logs be written to disk (and tails those logs for metrics). Why don't we recommend writing logs to disk? |
There was recently an internal experiment related to getting around this log tailing behavior of Agentv2.
|
Proposed changes
Describe the use case and detail of the change. If this PR addresses an issue on GitHub, make sure to include a link to
that issue here in this description (not in the title of the PR).
The issue is that the agent was not sending metrics to instance manager it was reporting and showing up in the dashboard. This is due to the metrics feature being mistyped (or possible its naming changing from before).
This table shows the acceptable values: https://docs.nginx.com/nginx-management-suite/nginx-agent/install-nginx-agent/#cli-flags-and-environment-variables .
Feel free to test this, as I really do not have the time to do proper unit testing if you have one. However, I can confirm that I started seeing metrics in instance manager right after this change in the configmap.
Checklist
Before creating a PR, run through this checklist and mark each as complete.