# Alucard
## Trace Siphon for Database Stats

Alucard is a simple service that can be started with a single service identifier and a comma-separated list of databases.  Alucard will load
 database timing stats into graphite for all SQL queries from the given service to any of the specified databases.  Currently, the tracked
 stats are query and transaction counts, query timings, and the lag between when the transaction was completed and the current time (for
 alucard health monitoring).  There is no way of measuring how much of the trace firehose is actually being consumed, so the transaction
 count should not be taken as a count of total matching transactions, but should instead be used for health monitoring and as a comparison
 to the query count.
 
Example:

```./alucard -FirehoseHostPort="trace-api.prod.us-west2.justin.tv:11143" -Service="code.justin.tv/web/web" -Databases="justintv_prod,site_justintv_prod"```

There is currently no way to allow multiple instances in an ASG to divide up work (although it does seem possible for trace to support it in
 the future), so
 only one instance should be assigned to any given alucard ASG.  The alucard service does multiplex processing from the firehose client thread to
 10 processing threads.
