Platform Team/sugar-stats: Difference between revisions

Line 16: Line 16:


* {{Code|sugar-stats-server}} command,
* {{Code|sugar-stats-server}} command,
* {{Code|/etc/sugar-stats.conf}} default configuration,
* {{Code|/etc/init.d/sugar-stats-server}} daemon.
* {{Code|/etc/init.d/sugar-stats}} daemon.


For stats transferring from clients, it is useful to use secure, SSL connections. The server configuration needs to be tweaked (and the [[Sugar_Server_Kit/sugar-client#Usage statistics|client]] should use the same certificate):
For stats transferring from clients, it is useful to use secure, SSL connections. The server configuration needs to be tweaked (and the [[Sugar_Server_Kit/sugar-client#Usage statistics|client]] should use the same certificate):


* {{Code|stats-keyfile}}, path to server's private key,
* {{Code|keyfile}}, path to server's private key,
* {{Code|stats-certificate}}, path to server's certificate file.
* {{Code|certificate}}, path to server's certificate file.


Server will authenticate clients using SSH keys generated on the client side by Sugar Shell. To let the server check client signatures, OpenSSH-5.6+ should be installed on the server side. For versions lower than 5.6, authentication needs to be disabled using the {{Code|trust-users}} parameter.
Server will authenticate clients using SSH keys generated on the client side by Sugar Shell. To let the server check client signatures, OpenSSH-5.6+ should be installed on the server side. For versions lower than 5.6, authentication needs to be disabled using the {{Code|trust-users}} parameter.
Line 28: Line 27:
=== Configuration ===
=== Configuration ===


Read the {{Code|/etc/sugar-stats.conf}} for explanation, or run the following command to get the current configuration with comments:
Run the following command to get the current configuration with comments:


  sugar-stats-server config
  sugar-stats-server config


These important parameters need to be set before using the server. (When sugar-stats-server is installed from packages, they are initialized to meaningful values.):
To tweak current configuration, change/create {{Code|/etc/sugar-stats-server.conf}} configuration file.


* {{Code|stats/stats-root <nowiki>=</nowiki> /var/lib/sugar-stats/rrd}}<br>Path to the root directory for placing stats;
The following important parameters need to be set before using the server. (When sugar-stats-server is installed from packages, they are initialized to meaningful values.):
* {{Code|active-document/data-root <nowiki>=</nowiki> /var/lib/sugar-stats/users}}<br>Path to the root directory for placing users' metadata;
 
* {{Code|stats/stats-root <nowiki>=</nowiki> /var/lib/sugar-network/rrd}}<br>Path to the root directory for placing stats;
* {{Code|active-document/data-root <nowiki>=</nowiki> /var/lib/sugar-network/users}}<br>Path to the root directory for placing users' metadata;


== Implementation notes ==
== Implementation notes ==