mandriva
 

MMC agent configuration file

Cédric Delfosse

Revision History
Revision $Revision: 49 $ $Date: 2007-09-24 22:52:34 +0200 (Mon, 24 Sep 2007) $ $Author: cedric $

Abstract

This document explains the content of the MMC agent configuration file


1. Introduction

The MMC agent is a XML-RPC server that exports to the network the API provided by the MMC python plugins.

Its configuration file is /etc/mmc/agent/config.ini. This file must be readable only by root, as it contains the login and password required to connect to the MMC agent.

Like all MMC related configuration file, its file format is INI style. The file is made of sections, each one starting with a « [sectionname] » header. In each section options can be defined like this « option = value ».

For example:

        [section1]
        option1 = 1
        option2 = 2

        [section2]
        option1 = foo
        option2 = plop
      

2. Configuration file sections

Table 1.  /etc/mmc/agent/config.ini available sections

Section name Description Optional
main MMC agent main option no
log other MMC agent option (to be removed) no

All the other sections (loggers, handlers, ...) are related to Python language logging framework. See http://docs.python.org/lib/logging-config-fileformat.html.

3. Section « main »

Table 2.  Available options for the "main" section

Option name Description Optional Default value
enablessl Enable SSL for XMLRPC communication. If disabled enabled, the XMLRPC traffic is not encrypted. yes 0
privkey Give the name of a file containing a private key. If enablessl=0, yes  
certfile Give the name of a file containing a certificate. If enablessl=0, yes  
host IP where we listen for incoming connections No  
port TCP/IP port where we listen for incoming connections No  
login login to connect to the mmc-agent No mmc
password password to connect to the mmc-agent No s3cr3t

If host=127.0.0.1, the MMC agent will only listen for local incoming connection. You can use host=0.0.0.0 to make it listen on all available network interfaces.

To connect to the MMC agent, the client (for example the MMC web interface) must do a HTTP Basic authentication, using the configured login and password.

You must change the login and password in the configuration file, because if you keep using the default configuration, anybody can connect to your MMC agent. MMC agent issue a warning if you use the default login and password.

When using SSL, the MMC agent doesn't check the client public certificate (if it gives one). SSL is only used to encrypt the connection.

4. Section « log »

This section will be deprecated soon.

Table 3.  Available options for the "log" section

Option name Description Optional Default value
name Name of the MMC agent daemon No  
pidfile Give the name of a file containing the PID of the MMC agent No  

5. Sections related to the Python logging module

See http://docs.python.org/lib/logging-config-fileformat.html.

In the default MMC agent configuration, two handlers are configured:

      [handler_hand01]
      class=FileHandler
      level=INFO
      formatter=form01
      args=("/var/log/mmc/mmc-agent.log",)
      
      [handler_hand02]
      class=StreamHandler
      level=DEBUG
      args=(sys.stderr,)
    

The handler hand01 records all logs emitted by the MMC agent (and its activated plugins) in the file /var/log/mmc/mmc-agent.log.

The handler hand02 is used by the MMC agent only when it starts to display startup messages, then it is closed.

6. How to enable full debug in MMC agent

Just set level=DEBUG in hand01 handler (see previous section), and restart the MMC agent.

All the remote function calls and responses are now recorded in MMC log file.