com.atlassian.confluence.content.render.xhtml.migration.exceptions.UnknownMacroMigrationException: The macro 'next_previous_links' is unknown.

Configuring metrics.xml

Metrics are enabled for all the reporters used by setting the Enabled parameter under the metrics element to true in the <ML_HOME>/resources/conf/metrics.xml file. If you want to disable metrics for an individual reporter, set the Enabled parameter under the relevant reporter element to false.

If you set the  the Enabled parameter under the metrics element to false, metrics will be disabled for all the reporters and it is not possible to enable metrics for individual reporters.

The reporters included by default in the metrics.xml file are JMX, CSV and JDBC.

JMX

The parameters that can be configured for JMX are as follows.

Element NameDescriptionTypeDefault ValueMandatory/Optional
EnabledThis parameter specifies whether metrics is enabled for JMX or not.BooleantrueMandatory

CSV

The parameters that can be configured for CSV are as follows.

Element NameDescriptionTypeDefault ValueMandatory/Optional
EnabledThis parameter specifies whether metrics is enabled for CSV or not.BooleanfalseMandatory
LocationThe location in which the CSV files are stored.String<ML_HOME>/repository/logs/metrics/Mandatory
PollingPeriodThe time interval at which the a polling activity is carried out to update the metrics dashboard based on the latest information. e.g., if the polling period is 60 , polling would be carried out every 60 milliseconds.Integer60Mandatory

JDBC

The parameters that can be configured for JDBC are as follows.

Element NameDescriptionTypeDefault ValueMandatory/Optional
EnabledThis parameter specifies whether metrics is enabled for JDBC or not.BooleantrueMandatory
DataSourceNameThe name of the datasource used.String jdbc/WSO2MetricsDB Mandatory
PollingPeriodThe time interval at which the a polling activity is carried out to update the metrics dashboard based on the latest information. e.g., if the polling period is 60, polling would be carried out every 60 milliseconds. This value is specified in milliseconds.Integer60Mandatory
ScheduledCleanupThis element contains parameters relating to the scheduled clean-up which includes Enabled, ScheduledCleanupPeriod and DaysToKeep. Scheduled clean-up involves creating a scheduled task to clear metric data in the database after a specified time interval. This is done to avoid excessive memory usage.N/AN/AMandatory
ScheduledCleanup/EnabledThis parameter specifies whether scheduled cleanup is enabled or not.BooleantrueMandatory
ScheduledCleanup/ScheduledCleanupPeriodThe number of milliseconds that should elapse after a clean-up task before the next clean-up task is carried out.Integer86400Mandatory
ScheduledCleanup/DaysToKeepThe number of days during which the scheduled clean-up task should be run.Integer7Mandatory

Example

The following is an excerpt of the metrics.xml file.

-->

<!--
    This is the main configuration file for metrics
-->

<Metrics xmlns="http://wso2.org/projects/carbon/metrics.xml">

    <!--
        Enable Metrics
    -->
    <Enabled>false</Enabled>
    <!--
        Metrics reporting configurations
    -->

    <Reporting>
        <JMX>
            <Enabled>true</Enabled>
        </JMX>
        <CSV>
            <Enabled>false</Enabled>
            <Location>${carbon.home}/repository/logs/metrics/</Location>
            <!-- Polling Period in seconds -->
            <PollingPeriod>60</PollingPeriod>
        </CSV>
        <JDBC>
            <Enabled>true</Enabled>
            <!-- Source of Metrics, which will be used to
                identify each metric in database -->
            <!-- Commented to use the hostname
                <Source>Carbon</Source>
            -->
            <!--
                JNDI name of the data source to be used by the JDBC Reporter.
                This data source should be defined in a *-datasources.xml
                file in conf/datasources directory.
            -->
            <DataSourceName>jdbc/WSO2MetricsDB</DataSourceName>
            <!-- Polling Period in seconds -->
            <PollingPeriod>60</PollingPeriod>
            <ScheduledCleanup>
                <!--
                    Schedule regular deletion of metrics data older than a set number of days.
                    It is strongly recommended that you enable this job to ensure your metrics tables do not get extremely
                    large. Deleting data older than seven days should be sufficient.
                -->
                <Enabled>true</Enabled>
                <!-- This is the period for each cleanup operation in seconds -->
                <ScheduledCleanupPeriod>86400</ScheduledCleanupPeriod>
                <!-- The scheduled job will cleanup all data older than the specified days -->
                <DaysToKeep>7</DaysToKeep>
            </ScheduledCleanup>
        </JDBC>
    </Reporting>
</Metrics>
com.atlassian.confluence.content.render.xhtml.migration.exceptions.UnknownMacroMigrationException: The macro 'next_previous_links2' is unknown.