Adding FS version and machine-readable uptime to heartbeat events
Does anybody have any objections if I add the FS version string and a machine-readable uptime to heartbeat events? Having the version string available in the heartbeat just seems like a good idea considering that we have other elements such as the core UUID and hostname in the event. And having the uptime as a machine-readable int will make it easier for monitoring apps to detect if the switch has rebooted (uptime goes backwards), assuming they missed other events that may have indicated that. I suggest using event header name "FreeSWITCH-Version" for the version. I see that FS tracks uptime down to millisecond resolution. Is it really this accurate? If so, then how about "Uptime-usec" ?
On Wed, Jul 11, 2012 at 8:51 AM, Daniel Swarbrick <daniel.swarbrick@gmail.com> wrote:
Having the version string available in the heartbeat just seems like a good idea considering that we have other elements such as the core UUID and hostname in the event. And having the uptime as a machine-readable int will make it easier for monitoring apps to detect if the switch has rebooted (uptime goes backwards), assuming they missed other events that may have indicated that.
I did a quick review of the code and didn't see FS's serial number in there. That too seems like it would be highly useful. Gabe
On 11/07/12 22:46, Gabriel Gunderson wrote:
I did a quick review of the code and didn't see FS's serial number in there. That too seems like it would be highly useful. Do you mean the number that's in freeswitch.serial? What (other than zrtp) uses this, and why is it needed in a heartbeat?
I've added the version string, and decided on making the uptime in milliseconds, since the timing of the heartbeat events is not exactly precise (nor is it intended to be), so microsecond resolution uptime seemed a bit silly.
On Wed, Jul 11, 2012 at 5:39 PM, Daniel Swarbrick <daniel.swarbrick@gmail.com> wrote:
Do you mean the number that's in freeswitch.serial? What (other than zrtp) uses this, and why is it needed in a heartbeat?
I don't know if it's the same thing or not. I'm talking about the unique number given to a FS instance when it's started up (as I recall, it's based on MAC addresses or something). It's sent with xml curl POSTs and so we'll often put that serial number in the database so we know what FS server is asking for it's configs. It can also be found in the log directory by cat-ing the 'freeswitch.serial' file (I think). Best, Gabe
On 12/07/12 06:51, Gabriel Gunderson wrote:
I don't know if it's the same thing or not. I'm talking about the unique number given to a FS instance when it's started up (as I recall, it's based on MAC addresses or something).
It's sent with xml curl POSTs and so we'll often put that serial number in the database so we know what FS server is asking for it's configs.
It can also be found in the log directory by cat-ing the 'freeswitch.serial' file (I think).
I see no freeswitch.serial in the log directory, however a file with that name is created in the conf directory each time FS starts (if it does not already exist). It consists of the hexadecimal representation of the local_ip_v4 variable, followed by four random hex chars. This is saved to the global switch variable "switch_serial", but the only place this is currently used is in the ZRTP zid_string. I think what you're seeing in the curl POSTs is something else.
this is fine, it should be moved to jira, if its not already, and it can be added. On Fri, Jul 13, 2012 at 5:45 PM, Daniel Swarbrick <daniel.swarbrick@gmail.com> wrote:
On 12/07/12 06:51, Gabriel Gunderson wrote:
I don't know if it's the same thing or not. I'm talking about the unique number given to a FS instance when it's started up (as I recall, it's based on MAC addresses or something).
It's sent with xml curl POSTs and so we'll often put that serial number in the database so we know what FS server is asking for it's configs.
It can also be found in the log directory by cat-ing the 'freeswitch.serial' file (I think).
I see no freeswitch.serial in the log directory, however a file with that name is created in the conf directory each time FS starts (if it does not already exist). It consists of the hexadecimal representation of the local_ip_v4 variable, followed by four random hex chars.
This is saved to the global switch variable "switch_serial", but the only place this is currently used is in the ZRTP zid_string.
I think what you're seeing in the curl POSTs is something else.
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
Join Us At ClueCon - Aug 7-9, 2012
FreeSWITCH-dev mailing list FreeSWITCH-dev@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev http://www.freeswitch.org
-- Anthony Minessale II FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ Twitter: http://twitter.com/FreeSWITCH_wire AIM: anthm MSN:anthony_minessale@hotmail.com GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com IRC: irc.freenode.net #freeswitch FreeSWITCH Developer Conference sip:888@conference.freeswitch.org googletalk:conf+888@conference.freeswitch.org pstn:+19193869900
participants (3)
-
Anthony Minessale
-
Daniel Swarbrick
-
Gabriel Gunderson