Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Squirro offers a number of ways to debug what is happening in the system. Each service maintains its log file, which helps with finding the source of an error. Additionally pre-installed daemon Monit helps by automatically restarting services that fail completely. A few basic operating system commands are also explained here, which can be used to find out if the base system is running smoothly.

...

Log FileServiceOSAdditional Notes
/var/log/squirro/squirro-*.logSquirro servicesAllDetailed log file about each service.
Symlink to /var/log/squirro/SERVICE_NAME/SERVICE_NAME.log.
/var/log/squirro/nginx-*-access.logNginx (Squirro services)AllEvery request to the web services is recorded in this log file in a line-by-line format.
Symlink to /var/log/squirro/SERVICE_NAME/nginx-access.log.
/var/log/squirro/nginx-*-error.logNginx (Squirro services)AllRecords errors on the HTTP level. When a service is stopped, errors may show up here indicating that the service is not reachable.
Symlink to /var/log/squirro/SERVICE_NAME/nginx-error.log.
/var/log/messages-AllGeneral system log. Serious system failures will be recorded here.
/var/log/elasticsearch/squirro.logElasticsearchAllRecords cluster information and major failures.
/var/log/redis/*.logRedisAll
/var/log/mysqld.logMySQLRHEL/CentOS 6
/var/log/mariadb/mariadb.logMariaDBRHEL/CentOS 7
/var/log/cronCron

/var/log/monit/monit.logMonitRHEL/CentOS 6Records service state changes and actions.
/var/log/secure /var/log/audit/audit.logSystemRHEL/CentOS 6/7Used to debug connection issues

Monit

With GNU/Linux Centos 6, Squirro comes pre-installed with Monit, a service that is used to automatically restart services that have failed.

Monit is configured by configuration files in /etc/monit.d. By default, all the main Squirro services are monitored.

...

Monit has a lot of options that can be added by configuration. For example, there is a web interface that can be used to see the current status of the machine. For security reasons, that interface is restricted to local access only by default. Consult the Monit manual, specifically the section MONIT HTTPD for information on how to enable this web interface for wider access. When doing that, beware that the local Firewall also needs to be opened for the corresponding port.

To retrieve the status fo the Squirro services via  the Monit command line interface, the following command can be used:

Code Block
languagebash
monit summary


System commands

The Squirro services are standard Unix daemons. Standard Linux utilities can be used to debug any issues that may arise.

...

The grep command searches files for occurrences of a specific text. For example, if Squirro is reporting errors, but you are unsure where they might be coming from, the following command helps pinning down the responsible service:

...

This will output a list of all Squirro log files that contain the text "ERROR" together with the lines that contain this text.


Squirro Logs 

All the Squirro logs are stored in /var/log/squirro. Each service has its own directory that  can be queried as follow:


Code Block
languagebash
tail -f /var/log/squirro/SERVICE/*.log 

For instance, if we are interested in the topic service:

Code Block
languagebash
tail -f /var/log/squirro/topic/*.log 

In case we want to check  all the services log:

Code Block
tail -f /var/log/squirro/*/*.log


The ingester service

Due to its complexity, the ingester service has a different log structure. To do its job the service manages a set of processes (named processor_X where X in (1,2 ... N)). Each process maintains its unique log in its unique directory. The easiest way to debug consists in merging their content via the following command:

Code Block
tail -f /var/log/squirro/ingester/processor_*/*.log