Closed
Bug 799965
Opened 13 years ago
Closed 13 years ago
Implement syslog-to-database insertion for imaging service
Categories
(Infrastructure & Operations :: RelOps: General, task)
Infrastructure & Operations
RelOps: General
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: ted, Assigned: dustin)
References
Details
Attachments
(2 files, 1 obsolete file)
|
956 bytes,
patch
|
Details | Diff | Splinter Review | |
|
7.66 KB,
patch
|
dividehex
:
review+
dustin
:
checked-in+
|
Details | Diff | Splinter Review |
This is a pretty standalone component. We need to monitor the syslog output from the devices and feed it into the logs table in the database.
| Assignee | ||
Updated•13 years ago
|
Assignee: server-ops-releng → dustin
| Assignee | ||
Comment 1•13 years ago
|
||
So, rsyslogd can insert directly into mysql, and that seems like the best option here. I can implement that when the DB flow is in place (bug 799624).
The separate question of how to *react* to those log entries will need to be handled elsewhere. I suspect that will be a daemon polling the DB, and consulting the logs table when necessary.
| Assignee | ||
Comment 2•13 years ago
|
||
I also discovered a bug in the rsyslogd config:
*.info;mail.none;authpriv.none;cron.none;local.none /var/log/messages
should be
*.info;mail.none;authpriv.none;cron.none /var/log/messages
and the line is rejected (silently, yay!) otherwise.
I'll fix that up here.
| Assignee | ||
Comment 3•13 years ago
|
||
rsyslogd on each imaging server will invoke this stored procedure to do the inserts. It encapsulates the find-id-then-insert pattern nicely in the DB.
Attachment #670861 -
Flags: review?(ted.mielczarek)
| Assignee | ||
Comment 4•13 years ago
|
||
this adds ltrim() - I hadn't noticed the spurious space before
Attachment #670861 -
Attachment is obsolete: true
Attachment #670861 -
Flags: review?(ted.mielczarek)
| Assignee | ||
Comment 5•13 years ago
|
||
* slurp logs from rsyslogd into mysql using a stored procedure
* do so with an in-memory queue to ride out short downtimes (10m), but discard over longer times
* also log to /var/log/boards
* install logrotate and use it to rotate /var/log/boards
* replace bb_db_url secret (python-specific) with a host/user/pass/db tuple
Attachment #670874 -
Flags: review?(jwatkins)
Comment 6•13 years ago
|
||
Comment on attachment 670874 [details] [diff] [review]
bug799965.patch
>+class packages::rsyslog_mysql {
>+ case $operatingsystem {
>+ CentOS: {
>+ package {
>+ "rsyslog-mysql":
>+ ensure => latest;
>+ }
>+ }
Probably want to require rsyslog here. Other than that, looks good.
Attachment #670874 -
Flags: review?(jwatkins) → review+
| Assignee | ||
Comment 7•13 years ago
|
||
Comment on attachment 670874 [details] [diff] [review]
bug799965.patch
committed with the require added
Attachment #670874 -
Flags: checked-in+
| Assignee | ||
Updated•13 years ago
|
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
| Reporter | ||
Comment 8•13 years ago
|
||
Since the tftpd logs to syslog, could we hook up some magic that could feed the syslog entry from when a board fetches its PXE config into the logs table? Presumably we'd have to look up the board by MAC address.
Comment 9•13 years ago
|
||
Comment on attachment 670874 [details] [diff] [review]
bug799965.patch
I pushed a bustage fix for this: http://hg.mozilla.org/build/puppet/rev/711679a2cb4b
| Assignee | ||
Comment 10•13 years ago
|
||
comment #8 spawned bug 801643
Updated•12 years ago
|
Component: Server Operations: RelEng → RelOps
Product: mozilla.org → Infrastructure & Operations
You need to log in
before you can comment on or make changes to this bug.
Description
•