Go to main content

man pages section 7: Standards, Environments, Macros, Character Sets, and Miscellany

Exit Print View

Updated: Wednesday, July 27, 2022
 
 

apache-stats (7)

Name

apache-stats - Oracle Solaris Apache Statistics Provider

Description

The apache-stats statistics provider draws information from Apache logs and server status pages and adds that information as statistics to the statistics repository. The apache-stats tool is invoked automatically by the svc:/system/apache-stats-24 service during system startup, and restarted if any failures occur. If the service is not configured with any Apache instance to monitor, it will temporarily disable itself. The administrator may reconfigure and manually enable the service. For more information about the statistics repository, see the sstore(7) man page.

Any log messages are captured in the SMF log for svc:/system/apache-stats-24. Use the following command to view the service log file:

$ svcs -L svc:/system/apache-stats-24

Configuration

To configure the apache-stats tool, modify the following properties of the svc:/system/apache-stats-24:default service instance:

config/query-interval

The interval (in seconds) at which apache-stats will query the server status pages of the monitored instances for information to provide as statistics. The default value is 120.

To configure apache-stats to monitor the Apache instance of a particular service, add a property group of type apache-instance with the following properties:

service-fmri

The FMRI of the service with an Apache instance to be monitored. This value is used as the resource key when the statistics are added to the statistics repository.

config-path

The path of the Apache configuration file for the Apache instance to be monitored. This value is used to identify the location of the Apache logs as well as the server status page for the Apache instance.

server-status-url

In some cases, the service is unable to determine the correct URL to monitor for server-status and drops into maintenance. A message is printed to the SMF logfile indicating that a specific monitored FMRI needs a server-status-url property added with the svccfg command. The format must end with the server-status?auto. For more information, see the svccfg(8) man page.

The default configuration monitors the webui/server instance:

<property_group type="apache-instance" name="webui-instance">
    <propval type="astring" name="config-path"
        value="/var/webui/conf/webui.conf"/>
    <propval type="fmri" name="service-fmri"
        value="svc:/system/webui/server:default"/>
</property_group>

The following is an example configuration for monitoring svc:/application/pkg/depot:

<property_group type="apache-instance" name="pkg-instance">
    <propval type="astring" name="config-path"
        value="/system/volatile/pkg/depot/depot_httpd.conf"/>
    <propval type="fmri" name="service-fmri"
        value="svc:/application/pkg/depot:default"/>
</property_group>

The following is an example configuration for monitoring a local Apache server instance where the local hostname does not match the hostname specified in its certificate:

<property_group type="apache-instance" name="local-apache-instance">
    <propval type="astring" name="config-path"
        value="/etc/apache2/2.4/httpd.conf"/>
    <propval type="fmri" name="service-fmri"
        value="svc:/network/http:apache24"/>
    <propval type="astring" name="server-status-url"
        value="https://www.example.com/server-status?auto"/>
</property_group>

Attributes

See attributes(7) for descriptions of the following attributes:

ATTRIBUTE TYPE
ATTRIBUTE VALUE
Availability
service/system/apache-stats-24
Stability
Committed

See Also

sstore(7), svcadm(8)

Notes

Use the svcadm command to perform administrative actions on the apache-stats-24 service, such as enabling, disabling, or restarting the service. Use the svccfg command to change the configuration of the service.