
Zitat von
baarthor
Wie bekomme ich nun eine MySQL Integration (MySQL Server läuft ebenfalls auf dem PI) hin?
Ich habe zum Test eine eigene DB die wie in dem Beispiel monitord (user und pw ebenfalls monitord) heißt, da ich unsere bisher laufende DB noch nicht benutzen möchte.
Du muss monitord wie hsk.oLLi beschreiben hat kompilieren.

Zitat von
hsk.oLLi
Code:
./configure --with-alsa --enable-plugins --with-mysql
make
sudo make install
Dann ein Datenbankschema namens monitord erstellen, dort rein drei Tabellen monitord_fms, monitord_zvei und monitord_pocsag. Columns, siehe unten.
In der monitord.xml die
PHP-Code:
<dataplugins>
<plugin name="mysql">
<file> /usr/local/lib/monitord/libmplugin_mysql.so.0</file>
<parameters>
<logfile> mysql.log </logfile>
<loglevel> DEBUG </loglevel>
<hostname> ip</hostname>
<port> 3306 </port>
<username> user </username>
<password> pass </password>
<mapping typ="fms">
<table> monitord_fms </table>
<field name="uhrzeit" source="mysql"> now() </field>
<field name="status"> statusdezimal </field>
<field name="kennung"> fmskennung </field>
<field name="richtung"> richtung </field>
<field name="text"> textuebertragung </field>
<field name="tki"> tki </field>
<field name="quelle"> channelnum </field>
</mapping>
<mapping typ="pocsag">
<table> monitord_pocsag </table>
<field name="uhrzeit" source="mysql"> now() </field>
<field name="kennung"> ric </field>
<field name="sub"> sub </field>
<field name="text"> text </field>
<field name="quelle"> channelnum </field>
</mapping>
<mapping typ="zvei">
<table> monitord_zvei </table>
<field name="uhrzeit" source="mysql"> now() </field>
<field name="typ"> weckton </field>
<field name="kennung"> zvei </field>
<field name="text"> text </field>
<field name="quelle"> channelnum </field>
</mapping>
</parameters>
</plugin>
</dataplugins>
einfügen.