Skip to content

Supervise SquashTM

Manage Logs

You can download SquashTM logs from the administration workspace or from the logs repository on the server. The logs of the current day are in the file squash-tm.log whereas the previous logs are suffixed with their date (example: squash-tm.log.20210527).

Logs Level

You can configure the SquashTM's app log rotation in the file conf/log4j2.xml.

In SquashTM, there are three levels of useful logs: "info", "debug", and "trace". The "trace" level is the most precise of the three, but also the most verbose.

To put SquashTM logs in "debug" level, you must:

  1. Stop SquashTM;
  2. In the file log4j2.xml, modify the value "info" by "debug" in the line:
        <Root level="info">
    
  3. Restart SquashTM.

After running your test, come back to the "info" level so as not to overload the server, since the logs are very voluminous in "debug" level.

SquashTM Loggers

The file log4j2.xml already contains a certain number of loggers. You can also individually modify their log level by modifying the value of the property level.

Here is a non-exhaustive list of additional loggers that you can add after the file's last Logger tag:

To get more precise logs for the Jira Data Center bugtracker:

<Logger name="org.squashtest.tm.plugin.bugtracker.jirarest" level="trace" additivity="false" >
    <AppenderRef ref="Console"/>
    <AppenderRef ref="Daily_log"/>
</Logger>

To increase the Git Connector plugin's logs level:

<Logger name="org.squashtest.tm.plugin.scm.git.internal.GitClientImpl" level="trace" additivity="false" >
     <AppenderRef ref="Console"/>
     <AppenderRef ref="Daily_log"/>
</Logger>

You must restart SquashTM for the app to take the changes made to the file into account.

Xsquash Logs

For Xsquash Cloud, you can download the logs directly from the Jira Cloud administration.

For Xsquash on Jira Data Center, the plugin logs are merged into the Jira plugins.

You can add a logger in "error" level for the package org.squashtest.plugin.jira.Xsquash to activate a more precise view of Xsquash errors in Jira logs.

Here are the steps to follow to add this logger:

  1. In Jira Data Center, go to Administration > System;
  2. Go to the part Log in and profile;
  3. In Default loggers, click on Configure logging level for another package;
  4. Enter the package org.squashtest.plugin.jira.Xsquash and set the logging level to "error".

Monitoring

Servers

As for any other application, the servers hosting SquashTM and its database should be monitored:

  • disk space: set up an alert when the disk space reaches a certain threshold;
  • CPU: set up an alert when the CPU usage remains high for a too long period;
  • RAM: idem;
  • network (optionally if there is a risk of the network being a bottleneck): idem.

SquashTM

SquashTM is a Spring Boot application, so your monitoring application can use the Actuators web endpoints to query it.

For example:

  • To use the actuator/health endpoint:
    add the following lines in the conf/squash.tm.cfg.properties file:
    management.endpoints.access.default = read-only
    management.endpoints.web.exposure.include = health 
    
    the endpoint can then be queried:
    >>> curl -s -u "<login>:<password>" https://<host>:<port>/squash/actuator/health | jq
    {
    "status": "UP"
    }
    
  • To also use the actuator/metrics endpoint:
    modify the second line above in the conf/squash.tm.cfg.properties file:
    management.endpoints.web.exposure.include = health,metrics 
    
    the endpoint can then be queried:
    >>> curl -s -u "<login>:<password>" https://<host>:<port>/squash/actuator/metrics/tomcat.sessions.active.current | jq
    {
      "name": "tomcat.sessions.active.current",
      "description": null,
      "baseUnit": "sessions",
      "measurements": [
        {
          "statistic": "VALUE",
          "value": 4
        }
      ],
      "availableTags": []
    }
    
    (You can use curl -s -u "<login>:<password>" https://<host>:<port>/squash/actuator/metrics to get the list of available metrics.)

Unavailability for SquashTM Cloud

Access to Actuator endpoints is limited to administrators. In the SquashTM Cloud offer, these endpoints are unavailable.

Database

Many tools can be used to monitor the PostgreSQL or MariaDB database (PostgreSQL's documentation lists some of them).