User:中華科學警察

Several irc logbots live here. Each is started like this:

$ sudo -iu local-morebots $ jstart -N /usr/lib/adminbot/adminlogbot.py --config ./confs/

To get a list of running bots:

$ become morebots $ qstat

To stop a running bot:

$ become morebots $ qdel 

The bots are:

analytics-logbot: Lives in #wikimedia-analytics and logs to www.mediawiki.org/wiki/Analytics/Server_Admin_Log

labs-logbot: Lives in #wikimedia-cloud and logs to https://wikitech.wikimedia.org/wiki/Labs_Server_Admin_Log

morebots: Lives in #wikimedia-operations and logs to wikitech.wikimedia.org/wiki/Server_Admin_Log

qa-morebots: Lives in #wikimedia-releng and logs to https://wikitech.wikimedia.org/wiki/Release_Engineering/SAL

test-logbot: Lives in #morebots-test and logs to www.mediawiki.org/wiki/Analytics/Server_Admin_Log (This one is generally not running, just here as a dev tool.)

become morebots qstat qdel  ./labs.sh jstart -N production-logbot /usr/lib/adminbot/adminlogbot.py --config ./confs/production-logbot.py
 * 1) now find the instance running on labs



morebots is a Python server admin log updatin' bot.

morebots listens in these channels on irc.freenode.net:
 * - see Help:Getting Started
 * - see Help:Getting Started

We also have qa-morebots to log to Release Engineering/SAL:

Setup
It runs from Wikimedia Tool Labs under the "morebots" account. Bots are started and stopped using normal tool labs conventions.

Source code is here: .

README
Several irc logbots live here. Each is started like this:

$ sudo -iu local-morebots $ jstart -N /usr/lib/adminbot/adminlogbot.py --config ./confs/

To get a list of running bots:

$ become morebots $ qstat

To stop a running bot:

$ become morebots $ qdel 

The bots are:

analytics-logbot: Lives in #wikimedia-analytics and logs to www.mediawiki.org/wiki/Analytics/Server_Admin_Log

labs-logbot: Lives in #wikimedia-cloud and logs to https://wikitech.wikimedia.org/wiki/Labs_Server_Admin_Log

morebots: Lives in #wikimedia-operations and logs to wikitech.wikimedia.org/wiki/Server_Admin_Log

qa-morebots: Lives in #wikimedia-releng and logs to https://wikitech.wikimedia.org/wiki/Release_Engineering/SAL

test-logbot: Lives in #morebots-test and logs to www.mediawiki.org/wiki/Analytics/Server_Admin_Log (This one is generally not running, just here as a dev tool.)

Example: restart the ops channel morebot
Ssh to login.tools.wmflabs.org

become morebots qstat qdel  ./labs.sh jstart -N production-logbot /usr/lib/adminbot/adminlogbot.py --config ./confs/production-logbot.py
 * 1) now find the instance running on labs

Deleting Twitter status
Sometime people fill in spam on IRC which ends up on twitter account. To clear them up, you can use small python script that uses the twitter token stored in the configuration file.

$ become morebots $ . ./venv/bin/activate $ python >>> import imp >>> botconf = imp.load_source('botconf', './confs/production-logbot.py') >>> import twitter >>> api = twitter.Api(**botconf.twitter_api_params) >>> print api.getStatus(12345678) >>> print api.DestroyStatus(12345678)
 * 1) List a status by id
 * 1) Delete it