[The Federaliser] - [How] - [Install] - [Config] - [JSON & XML] - [Extend] - [Implement]
Federaliser provides a flexible configuration system that allows users to define data sources, output formats, and security settings. Configuration can be done manually via configuration files or through the Admin Interface.
1. Manual Configuration
Configuration File
Federaliser uses an INI file to manage its configuration. This file defines the data sources, query parameters, and output settings.
Creating a Configuration File
- Copy the example configuration file:
cp example-config.ini config.ini
- Open
config.ini
and modify the settings according to your needs.
Example Configuration
[example_mysql]
source = mysql.example.com
port = 3306
type = mysql
identifier = mysql-metrics
username = dbuser
password = secret
default_db = mydatabase
query = SELECT host, status, COUNT(*) as total FROM connections GROUP BY host, status;
Key Configuration Options
- source: Database host, URL, or file path.
- port: Connection port (for database sources).
- type: Data source type (
mysql
,mssql
,redshift
,prometheus
, etc.). - identifier: Unique identifier for URL routing.
- username/password: Credentials for authentication.
- default_db: Default database for SQL sources.
- query: SQL query or command for data extraction.
Applying Configuration Changes
After modifying config.ini
, restart Federaliser to apply the new settings:
systemctl restart federaliser
2. Configuring Federaliser via the Admin Interface
Federaliser includes an optional Admin Interface that allows users to configure settings through a web-based UI.
Accessing the Admin Interface
- Open your browser and navigate to:
http://<YOUR_HOST>/admin
- You will see the dashboard, where you can manage data sources and output formats.
Adding a New Data Source
- Click on Add New Source.
- Enter the required details:
- Source Type (MySQL, Prometheus, JSON, etc.).
- Host/URL.
- Authentication Details (if applicable).
- Query Parameters.
- Click Save to apply changes.
Editing Existing Configurations
- Navigate to the Data Sources section.
- Click Edit next to the source you want to modify.
- Update the required fields and click Save.
Security Considerations
- The Admin Interface does not include built-in authentication.
- It is highly recommended to secure it using server-level authentication (e.g., Basic Auth in Nginx/Apache).
- Alternatively, remove the admin folder from production environments if not required.
3. Testing Your Configuration
After making changes (either manually or via the Admin Interface), test the configuration using a browser or API request:
curl http://<YOUR_HOST>/<identifier>
If correctly configured, the system should return JSON or Prometheus/OpenMetrics formatted data.
By following these steps, you can easily configure Federaliser to collect and export data in a structured and secure manner.