ibmap



Home

Instalation

Configuration

ScreenShots

Examples

About Me



General rules:

  • Every configuration must end with a ";"
  • Configurations may be splitted in several lines
  • "#" are used as remarks, and the rest os line will be ignored
  • Every global option or declaration will define defaults for the next declarations
  • A config file may be splitted in several files that can be included in main configuration file
  • Configurations are case insensitive

So, letīs go to config declarations:

Global Declarations:

Declaration
Description
Sample
OPTION DEBUG Level enable debug output (level shoud be more detailed, but is not implemented)
Option debug 1;
OPTION SHOW PROCESSTIME Print at end of every generated map, an information with elapsed time to generate map
Option Show Processtime;
OPTION LANGUAGE EN|PT Language used in debug (not implented yet)
Option Language PT;
OPTION DEFAULT FONT COLOR Cor Name of color that will be used as default in text fonts (this color must exist in color file)
Option Default font color red;
OPTION DEFAULT LINE COLOR Cor Name of color that will be used as default in lines (this color must exist in color file) Option Default line color black;
OPTION DEFAULT THICKNESS n
Default thickness os lines
Option Default Thickness 3;
OPTION DEFAULT WEBDIR Path 
Path of web directory which html files should be saved
Option Default WebDir /srv/www/htdocs/ibmap;
OPTION DEFAULT SOURCEDIR Path Path for configuration and include files
Option Default SourceDir /usr/local/etc/ibmap;
OPTION DEFAULT IMAGEDIR Path Path for images used in maps
Option Default SourceDir /var/images;
OPTION DEFAULT DATADIR Path
Path to Save RRD and TXT files
Option Default DataDir /var/data;
OPTION DEFAULT SNMP COMMUNITY "key" SNMP Community key used as dafault
Option Default SNMP Community "public";
OPTION DEFAULT SNMP VERSION Ver
Default SNMP Version (1 or 2c are supported)
Option Default SNMP version 2c;
OPTION DEFAULT RRD BACKTIME n seconds gap to write rrd  data (honestly I do not remenber why I had to use it...)
Option Default RRD BackTime 600;
OPTION DEFAULT RRD NUMBERFORMAT "txt" rule to format numbers in RRD (sprintf like)
Option default RRD NumberFormat "%08.2f";



External References:

Declaration
Description
Sample
COLOR FILE File
File that relates a name with a RGB code (this file will be searched in SourceDir if path is omitted)
Color File colors.dat;
STYLE FILE File File with Font and style definitions (this definitions could be located in regular config files)
Style File style.dat;

INCLUDE SourceConfigFile
Read configurations from this file
Include Market.conf;



Per Page Declarations:

Declaration
Description
Sample
PAGE Name An Internal and obrigatory name to refer each page - Inheritance: BACKGROUND-COLOR and  BACKGROUND-FILE.
Page Market;
BACKGROUND COLOR Color
A color to paint in background, and to be set as transparency reference
BackGround Color White;
BACKGROUND FILE File  An Image to be used as background (PNG|JPG|JPEG|GIF supported) BackGround File MarketLayout.png;
MAP File SOURCE File An html file that refer generated image with or without a html map tag. <See more on html templates>
Map market.html source market.inc;
OUTPUT (width,heigth) File Define the output image name, with size defined by width and heigth
Output (800,500) Market1.png;



Page Elements:

Declaration
Description
Sample
DISPLAY (c,l) "txt"  
        BORDER SIMPLE
        COLOR Cor
        STYLE Estilo 
        Align LEFT|RIGHT
        INSERT | OVERWRITE 
        Layer N
Display any text, with or without variables.
<See more on Display Definition>
Display (10,10) "Sales $Tot"  color black;
DRAW (c,l) SCALE|ODOMETER|SEMAPHORE|BAR|BOX|CIRCLE|ERRORS|WARNINGS     
     LEGEND Leg $Var
     COLOR Cor
     LAYER n
     FILTER /filter-RE/
     !FILTER /filter-RE/
Draw a Pre-defined shape, like a box, a circle, or an Legend Table.
<See more on Draw Definition>
Draw (700,400) Legend Sales;
DECLARE $Var
        FROM SNMP oid
             RRD ds FILE File
             EXECUTE Exec
             NAGIOS Server SERVICE "Service"
             SQL Sql
             RANDOM  inicio fim
             STATIC "value"
             CALC "CalcExpression"
        RE /../
        SUM /.../
        !RE /.../
        SAVERRD  RRDFile
        SAVETXT  DataFile
Define a Variable reference and source
<See more on Variables>
Declare $Total from Nagios LocalServer Service "Sales Total" SaveRRD SalesTotal;
OBJECT Nome (c,l)
        ALT "txt"
        PIC File SIZE c,l FACTOR n n
        URL "Url"
        FILL (l,c)
        LABEL "txt"
        COLOR Cor
        LAYER n
        BORDER CIRCLE|OVAL|BOX
        STYLE Estilo
        ALIGN CENTER|UP|DOWN|LEFT|RIGHT
        AREA (x1,y1,x2,y2,....xn,yn)
        Legend LEG
Declare an Object
Object MktServer (200,80)
URL "http://MktServer:8080/Status" border circle legend StServer;
LINK Obj Obj
     ARROW FROM|TO|BOTH|CENTER
     DISPLAY LOAD|VALUES|BOTH
       STYLE Estilo
     ALT "txt"
     URL "Url"
     LINES n
     LINESIZE n
     LEGEND Leg $Var
     LAYER n
     COLOR Cor
Link two objects with a line, or arrow
Link MktServer Switch arrow from display load Legend Liks $SWPort20;


Data Sources:

Declaration
Description
Sample
SNMP Nome HOST host COMMUNITY Comm  V1|V2C OID
File that relates a name with a RGB code (this file will be searched in SourceDir if path is omitted)
Color File colors.dat;
EXECUTE NOME "cmd" File with Font and style definitions (this definitions could be located in regular config files)
Style File style.dat;
NAGIOS FILE File
Path of Nagios Status File usually found at: /usr/local/nagios/var/status.dat
Nagios File /opt/nagios/var/status.dat;
NAGIOS EXECUTE "cmd" Comand to get status.dat
<See more on Nagios Integration>
Nagios Execute "/usr/bin/curl --connect-timeout 1 -s http://nagiosserver/getnagios.php";
SQL CONNECT Profile  SYBASE|MYSQL|POSTGRESQL|ORACLE HOST Host USER Username
    PASSWORD Password
    PARAMETERS "Parms"
Database Connection Properties
<See more on SQL Integration>
SQL Connect DbMkt mysql host localhost user mysql password my123  parameters "autoReconnect=true";
SQL QUERY Nome USING Profile "SQLQuery" Query Definition
<See more on SQL Integration>
SQL Query FilaSales Using DbMkt "SELECT SUM(Sale) AS TotalSales FROM Regional.Sales";


Miscelaneos Declarations:

Declaration
Description
Sample
LEGEND Nome "txt" Legend Definition
Legend Sales "Coorporative Sales";
SCALE Leg n "txt"
      COLOR Cor
Legend Range Definition
Scale Sales 10 "Low Sales" Color Red;
STYLE Estilo
      FONT Path
      FONTCOLOR Cor
      FONTSIZE n
      BORDER TIPO
      BORDERCOLOR Cor
      BORDERSIZE n
      BORDERBACKGROUND Cor
Font and text style
Style yellowBody font var/fonts/courbd.ttf FontSize 12 FontColor lightyellow;

  # Salva HTML - Map definitions, caso fornecido source utiliza arquivo como modelo,
                  no modelo, substitue tag <OUTPUT> pelo full pathfile da imagem gerada e
                  substitue a tag <INSERT nome> pelo <MAP NAME=nome><AREA SHAPE ....></MAP>.