14.1.3 ASCII measurement serversFor ASCII measurements the specifics is the data file to be created for the PVSR. The data file has four parts: equipment, measurement and uptime information and measurement data. Every line contains of semicolon separated list of values. Semicolons occurring in the values should be specified as “\;”. For multi-line parameters the ###NEW_LINE### string can be used to break its value into lines, as every record must be in a single line. If a base parameter has no value, it still has to be specified in the file with an empty value. The file is named as: coll.<unix time>.<measurement cycle in seconds >.data. If the file is ready, then a coll.<unix time>.<measurement cycle in seconds >.data.ready file needs to be created, even with zero size. The files need to be created in the tmp/COLL.<server ID> directory of the server. Only the measurement data part of the data files must be specified. The first two are only important for automatic discovery (COLLECTOR… parameters in the CONFIG_INI.pm file), since the equipment and measurements are created by the application based on these (the system searches for the equipment in the database by the equipment key). The precondition of this creation is that no other equipment with the same name should occur, and that the equipment should have no measurement of the specified name. The second precondition is that a value must be given to every necessary additional parameter that has no default value. 14.1.3.1 Equipment informationEquipment information lines start with the EQ field. The elements after this are (mandatory ones in bold face):
14.1.3.2 Measurement informationMeasurement information lines start with the M field. The elements after this are (mandatory ones in bold face):
14.1.3.3 Uptime dataThe uptime data lines start with the UPT field. The specified values are on the one hand displayed in the uptime filed of the equipment, and can be used in measurement definitions as the UPTIME variable. Every field is mandatory:
14.1.3.4 Measurement dataMeasurement data lines start with the V field. All fields other than OUT are mandatory:
14.1.3.5 Sample fileThe name of the file is coll.1116444300.300.data, its content is: #EQ;coll_key;name;<descr>;<rrd>;<collector_subtype><;param_name1;param_value1;param_name2;param_value2;...> EQ;ascii_eq_1;First ascii equipment;Ez This is a semicolon:\;;30;;ASCII_0001_EQ_TEXT1;Text 1 EQ;ascii_eq_2;Second ascii \; equipment;This is a semicolon:;;30;;ASCII_0003_EQ_S1;SECOND ;ASCII_0001_EQ_TEXT1;Text 1###NEW_LINE###Second line EQ;ascii_eq_3;Equipment 3;;30;;ASCII_0001_EQ_TEXT1;Nothing;HAS_no_SUCH_param #UPT;coll_key;uptime_in_sec UPT;ascii_eq_1;0 UPT;ascii_eq_2;0 UPT;ascii_eq_3;0 #M;coll_key;index;mtype1|mtype2|mptype3;descr;iis<;param_name1;param_value1;param_name2;param_value2;...> M;ascii_eq_1;INDEX1;#A1|#A3;First measurement;300;ASCII_0000_M_T1;szo\;veg M;ascii_eq_1;INDEX2;#A1|#A3;Second measurement;300;ASCII_0000_M_T1;szo\;veg M;ascii_eq_1;INDEX3;#A2;Third measurement;300 M;ascii_eq_1;INDEX3;#A3; M;ascii_eq_2;INDEX1;#A1|#A3;First measurement;300;ASCII_0000_M_T1;szo\;veg M;ascii_eq_2;INDEX2;#A1|#A3;Second measurement;300;ASCII_0000_M_T1;szo\;veg M;ascii_eq_2;INDEX3;#A2;Third measurement;300 M;ascii_eq_2;INDEX4;#A8;Unsuccesful measurement;300 M;ascii_eq_3;INDEX1;#A1|#A3;First measurement;300;ASCII_0000_M_T1;szo\;veg M;ascii_eq_3;INDEX2;#A1|#A3;Second measurement;300;ASCII_0000_M_T1;szo\;veg M;ascii_eq_3;INDEX3;#A2;Third measurement;300;ASCII_0000_M_T1;szo\;veg M;ascii_eq_3;INDEX4;#A8;Unsuccesful measurement;300;ASCII_0000_M_T1;szo\;veg #V;coll_key;index;mtype1;in1;out1<;mtype2;in2;out2;...> V;ascii_eq_1;INDEX1;#A1;2;;#A3;3;4 V;ascii_eq_1;INDEX2;#A1;5;;#A3;6;7 V;ascii_eq_1;INDEX3;#A2;8; V;ascii_eq_2;INDEX1;#A1;9;;#A3;10;10 V;ascii_eq_2;INDEX2;#A1;11;;#A3;12;12 V;ascii_eq_2;INDEX3;#A2;13; V;ascii_eq_2;INDEX4;#A8;14;15 V;ascii_eq_3;INDEX1;#A1;9;;#A3;10;10 V;ascii_eq_3;INDEX2;#A1;11;;#A3;12;12 V;ascii_eq_3;INDEX3;#A2;13; V;ascii_eq_3;INDEX4;#A8;14;15 As can be seen, the file can contain comment lines starting with # as well. |