Jump to content

Tool:SAL

From Wikitech
Toolforge tools
sal
Website https://sal.toolforge.org/
Description Server admin logs
Keywords SAL, php
Author(s) BryanDavis
Maintainer(s) BryanDavis, Yuvipanda (View all)
Source code github
License GNU General Public License 3.0 or later
Issues github

sal is a tool for searching Server Admin Log messages for a variety of projects. It provides both full text search and date based search capabilities that the normal wiki page based SAL system lacks.

SAL is written in PHP using the wikimedia/slimapp framework. It reads data from an Elasticsearch cluster hosted in Toolforge that is populated by Stashbot from IRC !log messages sent in various Libera.chat channels used by the Wikimedia projects.

Configuration

~/.lighttpd.conf

A .lighttpd.conf is used to configure lighttpd to route all URLs under https://sal.toolforge.org/ which are not for static asset files to a PHP dispatch script.

url.rewrite-if-not-file += ( "(.*)" => "/index.php/$0" )

~/SAL/.env

An .env file is used to provide Twelve-Factor App style configuration of the application.

ES_URL=http://elasticsearch.svc.tools.eqiad1.wikimedia.cloud/

Manually loading missed entries

TODO...

Operations

Some common operations

Restarting the tool

In case the tool seems down, for example because https://sal.toolforge.org returns 404 or any other error, you may restart it like this:

user@laptop:~$ ssh login.toolforge.org
user@tools-bastion-12:~$ become sal # or sudo become sal if you are a toolforge root
tools.sal@tools-bastion-12:~$ webservice restart
tools.sal@tools-bastion-12:~$ dologmsg 'webservice restart'

See also