How to write plugins :

1- 
first we create the plugin on the server edit the file
"etc/userdefine.pm" do not change thing in "etc/plugins.pm"
because this file may be overwitten in the next update
userdefine will not.

you will see entries like this 
 # CPU for win32 machines
  $conf->{"CPU.WIN"}->{"FIXED"}=0;
  $conf->{"CPU.WIN"}->{"DATA"}="GAUGE";
  $conf->{"CPU.WIN"}->{"LABLE"}="CPU da Maquina";
  $conf->{"CPU.WIN"}->{"V_LABLE"}="%";
  $conf->{"CPU.WIN"}->{"U_EXPONENT"}=0;
  $conf->{"CPU.WIN"}->{"FORMAT"}="%6.2lf%%";
  $conf->{"CPU.WIN"}->{"L_LIMIT"}=0;
  $conf->{"CPU.WIN"}->{"U_LIMIT"}=100;

CPU.WIN -> which means the plugin is called CPU and for the WIN arch is valid
use only CPU to set a default for all systems

FIXED - how many variable does the plugin report ( use 0 for dynamic the number is decided by the plugin )
        0 is recomended

DATA - see rrdtools it is the type of var stored , 
       use GAUGE ( if counters are reset by each read )
       use COUNTER ( if they are not , normaly network stuff )
       
LABLE - top text

V_LABLE left unit test

U_EXPONENT - dont scale the graphic

FORMAT - lower numbers are formated like this

L_LIMIT - lower limit

U_LIMIT - upper limit

L_MODIFY - modify the lower numbers
           ex "1000,/" will divide numers by 1000


2 the rest has to be done on the client

you will need 2 files one register and one update see the examples there

a) register

the plugin receives 
the location of the config file , the name of the plugin

the plugin has to send in one line like

CPU::Load ( 1m )::Load ( 5m )::

first name of the plugin , lable values in this case 2.

b) update

the plugin receives 
the location of the config file , the name of the plugin

the plugin has to send in one line like

CPU::1.68::1.68::

first name of the plugin , values in this case 2.

3 now just add it in the config file and issue an upgrade comand
