中華科學警察
Several irc logbots live here. Each is started like this:
$ sudo -iu local-morebots $ jstart -N <botname> /usr/lib/adminbot/adminlogbot.py --config ./confs/<config-for-this-bot>
To get a list of running bots:
$ become morebots $ qstat
To stop a running bot:
$ become morebots $ qdel <job#>
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
- now find the instance running on labs
qdel <id> ./labs.sh jstart -N production-logbot /usr/lib/adminbot/adminlogbot.py --config ./confs/production-logbot.py
morebots Release status: unknown |
|
---|---|
Description | Server Admin Log irc bot |
Author(s) | Andrew Bogott, Antoine Musso, Kunal Mehta, Ori Livneh, Reedy, Ryan Lane |
License | GPL-3.0+ |
Download | No link |
Issues : | Open tasks · Report a bug |
morebots is a Python server admin log updatin' bot.
morebots listens in these channels on irc.freenode.net:
#wikimedia-operations
#wikimedia-cloud
- see Help:Getting Started#Log your actions#wikimedia-analytics
We also have qa-morebots to log to Release Engineering/SAL:
#wikimedia-releng
Setup
editIt runs from Wikimedia Tool Labs under the "morebots" account. Bots are started and stopped using normal tool labs conventions.
Source code is here: <https://gerrit.wikimedia.org/r/gitweb?p=operations/debs/adminbot.git;a=tree>.
README
editSeveral irc logbots live here. Each is started like this: $ sudo -iu local-morebots $ jstart -N <botname> /usr/lib/adminbot/adminlogbot.py --config ./confs/<config-for-this-bot> To get a list of running bots: $ become morebots $ qstat To stop a running bot: $ become morebots $ qdel <job#> 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
editSsh to login.tools.wmflabs.org
become morebots qstat # now find the instance running on labs qdel <id> ./labs.sh jstart -N production-logbot /usr/lib/adminbot/adminlogbot.py --config ./confs/production-logbot.py
Deleting Twitter status
editSometime 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) # List a status by id >>> print api.getStatus(12345678) # Delete it >>> print api.DestroyStatus(12345678)
See also
edit- User:Labslogbot (wiki account that Morebots used until it was replaced by Stashbot in 2016)
- User:More Bots (wiki account that Morebots used until 2013)
- logmsgbot