The Project is the backend for the FileMaker Server LogViewer.
Since FileMaker Server 17 there is no convenient way for reading the log files. This project helps to overcome this circumstance.
Update: Since FileMaker Server 19.3.* there is a possibility to read and analyze log files directly in the FileMaker Server user interface. In my opinion, it is still not a good way to do it.
Node.js >= 12.x
- Download zip file from here or
git clone https://github.com/agametis/fms-logviewer-backend.git
- Unpack the file into a directory at any location on the machine where FileMaker Server is installed or go to the folder created by
git
- Replace or modify all files in the "encryption" subdirectory
- Rename file ".env-example" to ".env" on the command line
- on Windows:
ren .env-example .env
- on macOS:
vm .env-example .env
- Adapt file ".env"
- password for private key ("PASSPHRASE")
- if needed, change port, if 3050 can not be used
- Customize "server.js" with correct certificate files. Alternatively, the files in the "encryption" directory can be renamed, then this step is omitted.
- Constants "key", "cert" and "ca" ("key" is the private key, "cert" is the certificate, "ca" is the intermidiate certificate from the CA)
- To install all node modules dependencies run in the root directory of the application
npm install
- Start the server with
npm start
In the standard configuration port 3050 is usually not open for incomming traffic. Therefore, you need to add rules to your firewall configuration. At the moment, FileMaker Server is running on Ubuntu 18.04 LTS. To open port 3050 in the firewall, the following procedure is recommended:
- Open a super user session in your terminal on the server
sudo su
- Check if port 3050 is free
firewall-cmd --list-all
In the output you will see the missing port 3050
public
target: default
icmp-block-inversion: no
interfaces:
sources:
services: ssh dhcpv6-client
ports: 80/tcp 443/tcp 5003/tcp 16000/tcp 2399/tcp
protocols:
masquerade: no
forward-ports:
source-ports:
icmp-blocks:
rich rules:
As you can see, port 3050 is not open
- To open port 3050 use
firewall-cmd --zone=public --permanent --add-port=3050/tcp
In case, the port should not be open to the public, you need to apply the rule to your preferred zone.
- Apply the new rule
firewall-cmd --reload
- Check the status
firewall-cmd --list-all
The output lists the newly open port 3050.
...
services: ssh dhcpv6-client
ports: 80/tcp 443/tcp 5003/tcp 16000/tcp 2399/tcp 3050/tcp
protocols:
...
The new rule is permanently stored, so a reboot of the Linux server preserves the new rule.
Remark for command iptables
. With the command iptables -L
you will get
...
Chain IN_public_allow (1 references)
target prot opt source destination
ACCEPT tcp -- anywhere anywhere tcp dpt:ssh ctstate NEW
ACCEPT tcp -- anywhere anywhere tcp dpt:http ctstate NEW
ACCEPT tcp -- anywhere anywhere tcp dpt:https ctstate NEW
ACCEPT tcp -- anywhere anywhere tcp dpt:5003 ctstate NEW
ACCEPT tcp -- anywhere anywhere tcp dpt:16000 ctstate NEW
ACCEPT tcp -- anywhere anywhere tcp dpt:2399 ctstate NEW
ACCEPT tcp -- anywhere anywhere tcp dpt:gds-db ctstate NEW
...
where gds-db
is indicating the open port 3050.
- The firewall of your operating system or network must allow communication on the port specified in ".env" (default is 3050)
- The user running the Node.js server must have read permissions for the FileMaker Server "Logs" directory.
- To test the functionality, the address "https://localhost:3050/event" can be called locally in your browser. In the sucessfull response you will see the content of "Event.log" in JSON format in the browser window.
Distributed under the MIT License. See LICENSE
for more information.
Adam Augustin - @agametis - [email protected]
Project Link: https://github.com/agametis/fms-logviewer-backend
- Download Zip-Datei von hier oder
git clone https://github.com/agametis/fms-logviewer-backend.git
- Entpacke in ein Verzeichnis an beliebiger Stelle auf dem Rechner, auf dem der FileMaker Server installiert ist oder gehe in das mit
git
erzeugte Verzeichnis - Ersetze/bearbeite alle Dateien im "encryption" Unterverzeichnis
- Im Hauptverzeichnis der Anwendung die Datei ".env-example" auf der Kommandozeile in ".env" umbenennen
- unter Windows:
ren .env-example .env
- unter MacOS:
mv .env-example .env
- Datei ".env" anpassen
- Passwort fürs den privaten Schlüssel ("PASSPHRASE")
- eventuell Port, wenn die Nutzung von 3050 nicht möglich ist
- "server.js" mit korrekten Zertifikatsdateien anpassen. Alternativ können die Dateien im Verzeichnis "encryption" umbenannt werden, dann entfällt dieser Schritt
- Konstanten "key", "cert" und "ca" ("key" ist der private Schlüssel, "cert" ist das Zertifikat, "ca" ist das Zwischenzertifikate der CA)
- Im Hauptverzeichnis der Anwendung alle Node-Module installieren
npm install
- Server starten mit
npm start
Im Moment läuft FileMaker Server auf Ubuntu 18.04 LTS. In der Standardkonfiguration is der Port 3050 geschlossen. Um den Port 3050 in der Firewall zu öffnen, siehe die Anleitung oben.
- Die Firewall des Betriebssystems bzw. des Netztwerkes muss die Kommunikation auf dem Port (standard ist 3050) zulassen, welcher in ".env" definiert ist
- Der User, unter dem der Node.js Server läuft, muss Leserechte für das "Logs"-Verzeichnis des FileMaker Server haben
- Zum Testen der Funktionalität kann lokal die Adresse "https://localhost:3050/event" im Browser aufrufen werden. Als Antwort muss man den Inhalt von "Event.log" im JSON-Format im Browser sehen