Added SILC Thread Queue API
[runtime.git] / apps / silcmap / silcmap.conf
1 #
2 # Map drawing script file
3 #
4 # Command     : server { ... }
5 # Description : Specifies a server to connect, fetch statistics, draw the
6 #               server on map and to show its status on the map.  See the
7 #               example server command below for all parameters of this
8 #               command.
9 #
10 # Command     : loadmap { filename = <filename>; };
11 # Example     : loadmap { filename = "world_map.ppm"; };
12 # Description : Load the source bitmap image file to be used as the map
13 #
14 # Command     : writemap { filename = <filename>; };
15 # Example     : writemap { filename = "map.ppm"; };
16 # Description : Write the target bitmap image file
17 #
18 # Command     : writemaphtml { filename = <filename>; image = <filename>;
19 #                              cut_lat = <lat>; cut_lon = <lon>; };
20 # Example     : writemaphtml { filename = "htmlmap.map"; image = "map.jpg"; };
21 # Description : Write the gathered information as as HTML map page.  This
22 #               allows the user to click the specified points of URLs.
23 #               The html_url parameter in server will specify the 
24 #               URL that will be used in the HTML map.  If omitted the
25 #               filename created by writehml command is used.  The <cut_lat>
26 #               and <cut_lon> are specified if the <image> is a portion of
27 #               the original map image.  In this case the lat and lon specify
28 #               which portion it is.
29 #
30 # Command     : writehtml { filename = <filename>; class = <class>; };
31 # Example     : writehtml { filename = "index.html"; };
32 # Description : Write the gathered information as HTML pages.  Every server
33 #               command will have their own HTML file.  The filename is
34 #               based on the hostname of the server.  The index HTML file
35 #               will include list of the servers.  The generated HTML files
36 #               are quite raw and are intended to be embedded into user's
37 #               own website.  If <class> is defined it is used as the
38 #               CSS class in the created HTML page.
39 #
40 # Command     : writerel { filename = <filename>; class = <class;> };
41 # Example     : writerel { filename = "reliability.html"; };
42 # Description : Writes a reliability graph of the servers.  When SILC Map
43 #               is run several times the uptime statistics of the servers
44 #               that measure the reliability of the servers are drawn into
45 #               the reliability graph.  The uptime statistics will be
46 #               saved into corresponding server filename.  If <class>
47 #               is defined it is used as the CSS class in the created HTML
48 #               file.
49 #
50 # Command     : cut { lat = <lat>; lon = <lon>; width = <width>; 
51 #                     height = <height>; filename = <filename>; };
52 # Example     : cut { lat = "20"; lon = "5"; width = "1000"; height = "700";
53 #                     filename = "map_chunk.ppm"; };
54 # Description : Cuts a chunk from the source image at specified location.
55 #               The chunk will be <width> * <height> pixels in size.  The
56 #               <filename> is the output bitmap file where the chunk is saved.
57 #
58 # Command     : rectangle { lat = <lat>; lon = <lon>; color = <color>; 
59 #                           label = <label>; lposx = <x>; lposy = <y>; 
60 #                           lcolor = <label color>; };
61 # Example     : rectangle { lat = "-31 30"; lon = "0"; color = "0 0 255"; 
62 #                           label = "text"; lposx = "-10", lposy = "15"; };
63 # Description : Draws a rectangle at specified location.  The center of the
64 #               rectangle will be at specified location.  If the <label>
65 #               is specified, that text will appear with the rectangle at the
66 #               <lposx> and <lposy> pixel location in relation to the
67 #               rectangle.  If <lcolor> is omitted the <color> is used.
68 #
69 # Command     : circle { lat = <lat>; lon = <lon>; color = <color>;
70 #                        label = <label>; lposx = <x>; lposy = <y>; 
71 #                        lcolor = <label color>; };
72 # Example     : circle { lat = "31 30"; lon = "0"; color = "255 255 255"; };
73 # Description : Draws a circle at specified location.  The center of the
74 #               circle will be at specified location.  If the <label>
75 #               is specified, that text will appear with the circle at the
76 #               <lposx> and <lposy> pixel location in relation to the 
77 #               circle.  If <lcolor> is omitted the <color> is used.
78 #
79 # Command     : line { a_lat = <lat>; a_lon = <lon>; b_lat = <lat>;
80 #                      b_lon = <lon>; width = <width>; color = <color>; };
81 # Description : Draws a straight line between points a and b.  The <width>
82 #               is line width in pixels.  If omitted, default is 1.
83 #
84 # Command     : text { lat = <lat>; lon = <lon>; color = <color>;
85 #                      text = <text>; };
86 # Example     : text { lat = "63 42 13", lon = "23 17 34", color = "0 0 255";
87 #                      text = "This is an example text"; };
88 # Description : Prints the text <text> at the specified location
89 #
90 # The <lat> is in format DD MM SS, where DD is degrees, MM minutes, and
91 # SS seconds.  If DD is positive the latitude is north bound, if negative 
92 # it is south bound.  At least DD must be specified.
93 #
94 # The <lon> is in format DD MM SS, where DD is degrees, MM minutes, and
95 # SS seconds.  If DD is positive the longitude is east bound, if negative 
96 # it is west bound.  At least DD must be specified.
97 #
98 # The <color> is in format RRR GGG BBB, where RRR is red, GGG green and
99 # BBB blue, between 0 - 255.
100 #
101
102 loadmap   { filename = "map.ppm"; };
103 writemaphtml { filename = "map.html"; image = "map.jpg"; };
104
105 server {
106         # Server details
107         hostname        = "eample.server.com";
108         ip              = "10.2.1.1";
109         port            = "706";
110         public_key      = "example.server.com_706.pub";
111         country         = "Finland";
112         city            = "Kuopio";
113         admin           = "pekka";
114         description     = "";
115
116         # Connection parameters
117         connect         = false;
118         connect_timeout = "30";
119
120         # URL used in writemaphtml and writehtml, instead of hostname
121         #html_url = "";
122
123         # Statistics to fetch
124         starttime       = true;
125         uptime          = true;
126         clients         = true;
127         channels        = true;
128         server_ops      = true;
129         router_ops      = true;
130         cell_clients    = true;
131         cell_channels   = true;
132         cell_servers    = true;
133         all_clients     = true;
134         all_channels    = true;
135         all_servers     = true;
136         all_routers     = true;
137         all_server_ops  = true;
138         all_router_ops  = true;
139
140         # Fetch message of the day
141         motd            = true;
142
143         # Status colors when server is either up or down
144         up_color        = "150 200 190";
145         down_color      = "150 0 0";
146         up_text_color   = "60 200 200";
147         down_text_color = "150 0 0";
148
149         # Draw this server on the map
150         rectangle { lat = "36 00"; lon = "25 00";
151                     label = "example.server.com";
152                     lposx = "-30"; lposy = "10"; };
153 };
154
155 writemap  { filename = "testi2.ppm"; };