# Queue\_log realtime to MySQL

**URL:** <https://community.asterisk.org/t/queue-log-realtime-to-mysql/35426>\
**Category:** Asterisk Support\
**Created:** [May 29, 2011, 7:55am UTC](https://community.asterisk.org/t/queue-log-realtime-to-mysql/35426 "2011-05-29T07:55:09Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![perlik](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/perlik/32/334_2.png) [@perlik](https://community.asterisk.org/u/perlik)\
**Post date:** [May 29, 2011, 7:55am UTC](https://community.asterisk.org/t/queue-log-realtime-to-mysql/35426/1 "2011-05-29T07:55:09Z")

</div>

Hello All

How I can implement on my Astrisk 1.4.22(Trixbox) function, so Asterisk will put all queue\_log to mysql database in realtime?

Thanks

---

<div class="post-metadata">

**Author:** ![david55](https://avatars.discourse-cdn.com/v4/letter/d/e19adc/32.png) [@david55](https://community.asterisk.org/u/david55)\
**Post date:** [May 29, 2011, 9:20am UTC](https://community.asterisk.org/t/queue-log-realtime-to-mysql/35426/2 "2011-05-29T09:20:27Z")

</div>

Modify the source code. You might also be able to make the log file a named pipe and have something read that and copy to the database, but I don’t guarantee that will work.

---

<div class="post-metadata">

**Author:** ![perlik](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/perlik/32/334_2.png) [@perlik](https://community.asterisk.org/u/perlik)\
**Post date:** [June 14, 2011, 12:50pm UTC](https://community.asterisk.org/t/queue-log-realtime-to-mysql/35426/3 "2011-06-14T12:50:42Z")

</div>

Sorry, But which source code I have to modify? queue? logger?

---

<div class="post-metadata">

**Author:** ![david55](https://avatars.discourse-cdn.com/v4/letter/d/e19adc/32.png) [@david55](https://community.asterisk.org/u/david55)\
**Post date:** [June 14, 2011, 1:28pm UTC](https://community.asterisk.org/t/queue-log-realtime-to-mysql/35426/4 "2011-06-14T13:28:09Z")

</div>

I incorrectly believed there was no database support. Looking at the obvious place to modify (queue\_log in logger.c) there is database support. Beyond that, I can’t help you, as I don’t use any of the relational database stuff.

---

<div class="post-metadata">

**Author:** ![ianplain](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/ianplain/32/1776_2.png) [@ianplain](https://community.asterisk.org/u/ianplain)\
**Post date:** [June 14, 2011, 2:00pm UTC](https://community.asterisk.org/t/queue-log-realtime-to-mysql/35426/5 "2011-06-14T14:00:08Z")

</div>

Hi There are various parse apps that parse the logs in realtime and near realtime, have a look at [asternic.org/stats](http://asternic.org/stats) as the stats package include a very good parser.

Ian  
[www.cyber-cottage.co.uk](http://www.cyber-cottage.co.uk)  
twitter @cyberco

---

<div class="post-metadata">

**Author:** ![perlik](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/perlik/32/334_2.png) [@perlik](https://community.asterisk.org/u/perlik)\
**Post date:** [June 14, 2011, 2:57pm UTC](https://community.asterisk.org/t/queue-log-realtime-to-mysql/35426/6 "2011-06-14T14:57:55Z")

</div>

[quote=“ianplain”]Hi There are various parse apps that parse the logs in realtime and near realtime, have a look at [asternic.org/stats](http://asternic.org/stats) as the stats package include a very good parser.

Ian  
[cyber-cottage.co.uk](http://www.cyber-cottage.co.uk)  
twitter @cyberco[/quote]  
Thanks but it’s working with their own database.

---

<div class="post-metadata">

**Author:** ![ianplain](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/ianplain/32/1776_2.png) [@ianplain](https://community.asterisk.org/u/ianplain)\
**Post date:** [June 14, 2011, 3:05pm UTC](https://community.asterisk.org/t/queue-log-realtime-to-mysql/35426/7 "2011-06-14T15:05:23Z")

</div>

It writing it to a mysql database, we use this for many things, wallboards etc. once its in the database you can do with it what you want, This will store your agents and queues without any intervention.

Ian
