Skip to content

Commit

Permalink
Cloud Log Manager and Syslog forwarders
Browse files Browse the repository at this point in the history
- New modals on active loki cards
- New card on cluster status
- Some other fix
  • Loading branch information
tommaso-ascani committed Jun 25, 2024
1 parent 629b90c commit 3144893
Show file tree
Hide file tree
Showing 9 changed files with 1,014 additions and 30 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ for instance in instances:

try:
task_response = agent.tasks.run(
agent_id=f'module/{instance["id"]}',
action='get-configuration',
agent_id=f"module/{instance['id']}",
action="get-configuration",
endpoint="redis://cluster-leader"
)
if task_response["exit_code"] == 0:
Expand All @@ -40,6 +40,8 @@ for instance in instances:
item["active_from"] = task_response["output"]["active_from"]
if "active_to" in task_response["output"]:
item["active_to"] = task_response["output"]["active_to"]
item["cloud_log_manager"] = task_response["output"]["cloud_log_manager"]
item["syslog"] = task_response["output"]["syslog"]
else:
item["offline"] = True
except Exception as e:
Expand All @@ -50,5 +52,5 @@ for instance in instances:
response.sort(key=get_active, reverse=True)

json.dump({
'instances': response
"instances": response
}, sys.stdout)
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,65 @@
"type": "string",
"format": "date-time",
"description": "The ISO 8601 date-time when the Loki instance was deactivated."
},
"cloud_log_manager": {
"type": "object",
"description": "Cloud Log Manager forwarder configuration.",
"required": [
"status"
],
"properties": {
"status": {
"type": "string",
"description": "Forwarder state."
},
"address": {
"type": "string",
"description": "Forwarder address where datas are sent."
},
"tenant": {
"type": "string",
"description": "Cloud Log Manager internal data."
},
"last_timestamp": {
"type": "string",
"description": "Timestamp of the last log sent."
}
}

},
"syslog": {
"type": "object",
"description": "Syslog forwarder configuration.",
"required": [
"status"
],
"properties": {
"status": {
"type": "string",
"description": "Forwarder state."
},
"address": {
"type": "string",
"description": "Forwarder address where data are sent."
},
"port": {
"type": "string",
"description": "External server port."
},
"protocol": {
"type": "string",
"description": "Protocol used to send datas."
},
"format": {
"type": "string",
"description": "Log format."
},
"last_timestamp": {
"type": "string",
"description": "Timestamp of the last log sent."
}
}
}
}
}
Expand Down
51 changes: 47 additions & 4 deletions core/ui/public/i18n/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@
"remember": "Remember",
"click_here_to_upload": "Click here to upload",
"not_active": "Inactive",
"active": "Active"
"active": "Active",
"configure": "Configure"
},
"error": {
"error": "Error",
Expand Down Expand Up @@ -113,7 +114,8 @@
"fqdn_format": "Invalid FQDN format",
"cannot_retrieve_users_admin_configuration": "Cannot retrieve users portal administration",
"cannot_retrieve_subscription_status": "Cannot retrieve subscription status",
"cannot_retrieve_email_notification_status": "Cannot retrieve email notifications status"
"cannot_retrieve_email_notification_status": "Cannot retrieve email notifications status",
"cannot_retrieve_system_logs_status": "Cannot retrieve system logs status"
},
"websocket": {
"websocket_disconnected": "Websocket disconnected",
Expand Down Expand Up @@ -961,7 +963,9 @@
"uninstall_instance": "Uninstall {name}",
"understood_uninstall": "I understand, uninstall",
"valid_number": "Insert a valid number",
"greater_than_0": "Enter a number greater than 0"
"greater_than_0": "Enter a number greater than 0",
"configure_cloudLogManagerForwarder": "Configure Cloud Log Manager",
"configure_syslogForwarder": "Configure export to Syslog"
}
},
"audit_trail": {
Expand Down Expand Up @@ -1000,7 +1004,10 @@
"subscription_status": "Subscription",
"go_to_subscription": "Go to Subscription",
"email_notification": "Email notifications",
"go_to_settings": "Go to settings"
"go_to_settings": "Go to settings",
"system_logs": "System logs",
"go_to_system_logs": "Go to System logs",
"active_instance": "Active instance: {instance}"
},
"domains": {
"title": "Domains and users",
Expand Down Expand Up @@ -1344,5 +1351,41 @@
"port_invalid_type": "It must be a valid number port (1-65535)",
"port_number_gte": "The port must be greater than 0 (1-65535)",
"encrypt_smtp_enum": "It must be one of the following: none, starttls, tls"
},
"syslog_forwarder": {
"configure_export_to_syslog": "Configure export to Syslog",
"export_to_syslog": "Export to syslog",
"hostname_ip_address": "Hostname/IP address",
"port": "Port",
"protocol": "Protocol",
"format": "Format",
"syslog_export_enabled": "Export to Syslog is enabled",
"syslog_export_failed": "Export to Syslog is failed",
"export_starting_date_tooltip": "Lorem Ipsum",
"format_tooltip": "Lorem Ipsum",
"udp": "UDP",
"tcp": "TCP",
"rfc3164": "rfc3164",
"rfc5424": "rfc5424",
"start_date": "Start date",
"start_time": "Start time (24-hour)"
},
"cloud_log_manager_forwarder": {
"configure_export_to_cloud_log_manager": "Configure Cloud log manager",
"export_to_cloud_log_manager": "Export to Cloud log manager",
"address": "Cloud log manager URL",
"tenant": "Tenant",
"export_starting_date": "Export starting date",
"use_last_timestamp": "Use last timestamp ({timestamp})",
"choose_a_datetime": "Choose a date and time",
"tenant_tooltip": "Lorem Ipsum",
"export_starting_date_tooltip": "Lorem Ipsum",
"cloud_log_manager_export_enabled": "Export to Cloud Log Manager is enabled",
"cloud_log_manager_export_failed": "Export to Cloud Log Manager is failed",
"start_date": "Start date",
"start_time": "Start time (24-hour)",
"more_details": "More Details",
"available_with_subscription_title": "Available with subscription",
"available_with_subscription": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
}
}
Loading

0 comments on commit 3144893

Please sign in to comment.