ALERT: Some images may not load properly within the Knowledge Base Article. If you see a broken image, please right-click and select 'Open image in a new tab'. We apologize for this inconvenience.

adding username and password in the webserverconfig.xml for apache webserver monitoring


Article ID: 222917


Updated On:


CA Application Performance Management (APM / Wily / Introscope) DX APM SaaS CA Application Performance Management Agent (APM / Wily / Introscope) DX Application Performance Management


We are using webserver monitoring extension to monitor an Apache webserver 

How can we enable user authentication in the extension - this does not appear to be documented.


Release : 20.x, 21.x

Component :


Assuming authentication is defined similar to this in the httpd.conf

<Location /server-status>
SetHandler server-status
Order deny,allow
Allow from all
AuthType Basic
AuthName "Please login to access server status part"
AuthUserFile /etc/httpd/.htpasswd
Require valid-user

then the user credentials can be passed in using the http header section in the WebServerConfig.xml entry e.g.

<WebServer Type="Apache" Enabled="true" ServerURL="http://myhost" DisplayName="LVN5671" RefreshFrequencyInSeconds="30" MetricsURL="server-status/">
      <HttpHeader name="Authorization" value = "Basic YXBtOmFwbQ=="/>

the encrypted password string can be obtained using base64 e.g.

# echo -n user:password |base64

and the connection tested outside the agent using curl

# curl -H "Authorization: Basic YXBtOmFwbQ==" http://myhost/server-status