Commands¶
datanommer-create-db¶
Create a database and tables for ‘datanommer.sqlalchemy.url’
Usage
datanommer-create-db [OPTIONS]
Options
- -c, --config <config_path>¶
Load this Fedora Messaging config file
datanommer-dump¶
Dump the contents of the datanommer database as JSON.
You can also specify a timespan with the –since and –before arguments:
$ datanommer-dump –before 2013-02-15 –since 2013-02-11T08:00:00 > datanommer-dump.json
Usage
datanommer-dump [OPTIONS]
Options
- -c, --config <config_path>¶
Load this Fedora Messaging config file
- --since <since>¶
Only after datetime, ex 2013-02-14T08:05:59.87
- --before <before>¶
Only before datetime, ex 2013-02-14T08:05:59.87
datanommer-extract-users¶
Usage
datanommer-extract-users [OPTIONS] COMMAND [ARGS]...
Options
- -c, --config <config_path>¶
Load this Fedora Messaging config file
- --topic <topic>¶
Only extract users for messages of a specific topic.
- --category <category>¶
Only extract users for messages of a specific category.
- --start <start>¶
Only extract users for messages after a specific timestamp.
- --end <end>¶
Only extract users for messages before a specific timestamp.
- --force-schema <force_schema>¶
Force usage of this schema name to extract usernames. This is the key in the exposed entry point / plugin, for example: wiki.article.edit.v1
- --chunk-size <chunk_size>¶
Go through messages these many at a time (lower is slower but saves memory).
- Default:
10000
- --debug¶
Show more information.
agent¶
Go over old messages, extract the agent_name and store it.
This is useful when a message schema has been added and we want to populate the agent_name column with the new information.
Usage
datanommer-extract-users agent [OPTIONS]
usernames¶
Go over old messages, extract users and store them.
This is useful when a message schema has been added and we want to populate the users table with the new information.
Usage
datanommer-extract-users usernames [OPTIONS]
datanommer-latest¶
Print the latest message(s) ingested by datanommer.
The default is to display the latest message in each message category. The latest in only a specified category or topic can also be returned:
$ datanommer-latest --category bodhi
[{"bodhi": {
"topic": "org.fedoraproject.stg.bodhi.update.comment",
"msg": {
"comment": {
"group": null,
"author": "ralph",
"text": "Testing for latest datanommer.",
"karma": 0,
"anonymous": false,
"timestamp": 1360349639.0,
"update_title": "xmonad-0.10-10.fc17"
},
"agent": "ralph"
},
}}]
$ datanommer-latest --topic org.fedoraproject.stg.bodhi.update.comment
[{"bodhi": {
"topic": "org.fedoraproject.stg.bodhi.update.comment",
"msg": {
"comment": {
"group": null,
"author": "ralph",
"text": "Testing for latest datanommer.",
"karma": 0,
"anonymous": false,
"timestamp": 1360349639.0,
"update_title": "xmonad-0.10-10.fc17"
},
"agent": "ralph"
},
}}]
Or to display the latest, regardless of the topic or category:
$ datanommer-latest --overall
[{"bodhi": {
"topic": "org.fedoraproject.stg.bodhi.update.comment",
"msg": {
"comment": {
"group": null,
"author": "ralph",
"text": "Testing for latest datanommer.",
"karma": 0,
"anonymous": false,
"timestamp": 1360349639.0,
"update_title": "xmonad-0.10-10.fc17"
},
"agent": "ralph"
},
}}]
You can combine either a –topic, –category or –overall argument while requesting information about the timestamp of the latest:
$ datanommer-latest --category wiki --timestamp
[1361166918.0]
# February 18, 2013 at 5:55AM
$ datanommer-latest --category wiki --timestamp --human
["2013-02-18 05:55:18"]
Or how recent that timestamp is:
# 49250 seconds ago
$ datanommer-latest --category wiki --timesince
[49250]
# 13 hours, 40 minutes, 59.52 seconds ago
$ datanommer-latest --category wiki --timesince --human
[13:40:59.519447]
Usage
datanommer-latest [OPTIONS]
Options
- -c, --config <config_path>¶
Load this Fedora Messaging config file
- --topic <topic>¶
Show the latest for only a specific topic.
- --category <category>¶
Show the latest for only a specific category.
- --overall¶
Show only the latest message out of all message types.
- --timestamp¶
Show only the timestamp of the message(s).
- --timesince¶
Show the number of seconds since the last message
- --human¶
When combined with –timestamp or –timesince,show a human readable date.
datanommer-refresh-view¶
Refresh the materialized view recent_topics.
This command should be run periodically via cron job to keep the materialized view recent_topics up to date.
Usage
datanommer-refresh-view [OPTIONS]
Options
- -c, --config <config_path>¶
Load this Fedora Messaging config file
datanommer-stats¶
Produce stats on the contents of the datanommer database.
The default is to display the stats per category. You can also display the stats per topic with the –topic argument:
$ datanommer-stats –topic org.fedoraproject.stg.fas.group.member.remove has 10 entries org.fedoraproject.stg.logger.log has 76 entries org.fedoraproject.stg.bodhi.update.comment has 5 entries org.fedoraproject.stg.busmon.colorized-messages has 10 entries org.fedoraproject.stg.fas.user.update has 10 entries org.fedoraproject.stg.wiki.article.edit has 106 entries org.fedoraproject.stg.fas.user.create has 3 entries org.fedoraproject.stg.bodhitest.testing has 4 entries org.fedoraproject.stg.fedoratagger.tag.create has 9 entries org.fedoraproject.stg.fedoratagger.user.rank.update has 5 entries org.fedoraproject.stg.wiki.upload.complete has 1 entries org.fedoraproject.stg.fas.group.member.sponsor has 6 entries org.fedoraproject.stg.fedoratagger.tag.update has 1 entries org.fedoraproject.stg.fas.group.member.apply has 17 entries org.fedoraproject.stg.__main__.testing has 1 entries
The –category argument can be combined with –topic to shows stats of the topics with a specific category or can be used alone to show the stats for only the one category:
$ datanommer-stats –topic –category fas org.fedoraproject.stg.fas.group.member.remove has 10 entries org.fedoraproject.stg.fas.user.update has 10 entries org.fedoraproject.stg.fas.user.create has 3 entries org.fedoraproject.stg.fas.group.member.sponsor has 6 entries org.fedoraproject.stg.fas.group.member.apply has 17 entries
$ datanommmer-stats –category fas fas has 46 entries
Usage
datanommer-stats [OPTIONS]
Options
- -c, --config <config_path>¶
Load this Fedora Messaging config file
- --topic¶
Shows the stats per topic
- --category <category>¶
Shows the stats within only the specified category