A small command line tool to check which engines return results of an instance.
Results can be retrieved by searx.space
to contribute to the engine statistics of the public Searx instances.
To make engines work correctly as much as possible, please update the examined searx
instance to the latest commit.
searx-checker
might be embedded into searx
in the future.
- Python >= 3.5
git clone git@github.com:searx/searx-checker.git
cd searx-checker
mkdir -p html/data
virtualenv -p python3 venv
source venv/bin/activate
pip3 install -r requirements.txt
python3 checker/checker.py -o html/data/status.json <instance-url>
Example output of an instance with 2 non-responsive engines and 3 working engines.
python3 checker/checker.py http://localhost:8888
Testing 5 engines of http://localhost:8888
google.OK
bing.OK
gitlab......ERROR No result
vimeo......ERROR unexpected crash: list index out of range
twitter.OK
Engines of http://localhost:8888 not returning results:
gitlab: No result
vimeo: unexpected crash: list index out of range
You might want to check these manually...
On your nginx
configuration file for searx, you need to serve the file status.json
generated by searx-checker
by activating correctly the /status
route.
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_pass http://localhost:4004;
proxy_redirect off;
}
location /status {
root /srv/http/searx-checker/html;
rewrite ^/status$ /data/status.json break;
}
Same for Caddy.
root /srv/
...
rewrite / {
regexp ^/status$
to /searx-checker/html/data/status.json
}
proxy / localhost:4004 {
transparent
header_upstream X-Forwarded-TlsProto {tls_protocol}
header_upstream X-Forwarded-TlsCipher {tls_cipher}
header_upstream X-Forwarded-HttpsProto {proto}
except /searx-checker/html/data/status.json
}
systemd
offers a modern built-in cron-like job scheduler with systemd timers
.
vim /etc/systemd/system/searx-checker.timer
[Unit]
Description=Daily update of the engine statistics of your public Searx instance
[Timer]
OnCalendar=daily
RandomizedDelaySec=1h
Persistent=true
[Install]
WantedBy=timers.target
Please replace below instance_url by the URL of your Searx instance.
vim /etc/systemd/system/searx-checker.service
[Unit]
Description=searx-checker status renewal
[Service]
Type=oneshot
User=http
WorkingDirectory=/srv/http/searx-checker
ExecStart=/srv/http/searx-checker/venv/bin/python3 checker/checker.py -o html/data/status.json instance_url
To use searx-checker
with Docker, please go to the searx-docker
project.