Skip to main content
November 28, 2006
Question

Logging performance stats externally

  • November 28, 2006
  • 2 replies
  • 352 views
Can I programatically obtain the kind of performance stats you see in the management interface, e.g. get a count of number of connections, number of active streams etc.

We use tools like munin and nagios for server tracking, I'd like to integrate FMS into this.

Can anyone recommend the best way to go about this?
    This topic has been closed for replies.

    2 replies

    December 1, 2006
    You can make a management aka debug connection to the server (by supplying the login + password you use to access the FMS console) and then read using the built-in management-commands all information that's available at that time.

    To store periodic data (e.g. samples every 5 minutes) you have to create an SWF that will connect to the server and will retrieve the data you want. Then use a simple sendAndLoad method to supply the data to some script on some webserver and let the script store the data in a database for later analysis.

    You can find many examples in the management-docs (pdf) in the documentation directory of your FMS-installation.
    December 2, 2006
    I suppose the best way to do it depends on the structure of your application and what data you need to collect. Data about connected clients and streams can be obtained through your application, but if you want to track data transfer, bandwidth usage, license usage, etc.... you'll need to make a connection to the admin service.

    You can use a .swf to retrieve the data as FMS-Developer mentioned, but you can also have that happen on the server side. You can build an FMS app that will run with no connected clients, and report server stats back to your remoting service, XML socket server, or to any app server that accepts http post/get requests. If you don't use an .swf, you just need to design the app so it doesn't shut down when the server does garbage collection (return false in your onAppStop handler), and you'd need to start it through the admin console.

    Since most of the http side backend I do is PHP I prefer to use AMFPHP for things like this, but there are a world of otheroptions. If you provide some detail about the data you need to collect and how you need to collect it, and about your server/application server/web service model, maybe we can come up with ideas about the best option.
    December 1, 2006
    I am also very interested in showing my customers reports on their usage. It seems I cannot find any good info or tutorials on line, and am not proficient enough yet to make it from scratch myself (without guidance).

    If anyone can help, please let me know too!