Skip to content

Commit 4a3a47f

Browse files
authored
feat: supported added to the agents variation to provision the logs agent for sending logs to IBM Cloud logs<br>- NOTE: The Log Analysis agent is not longer deploted by default due to the Log Analysis services being deprecated (#167)
1 parent c9c904a commit 4a3a47f

File tree

12 files changed

+502
-53
lines changed

12 files changed

+502
-53
lines changed

ibm_catalog.json

Lines changed: 196 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -562,20 +562,209 @@
562562
"optional": true
563563
}
564564
],
565+
"configuration": [
566+
{
567+
"key": "ibmcloud_api_key"
568+
},
569+
{
570+
"key": "prefix"
571+
},
572+
{
573+
"key": "cluster_id"
574+
},
575+
{
576+
"key": "cluster_resource_group_id"
577+
},
578+
{
579+
"key": "cluster_config_endpoint_type",
580+
"options":[
581+
{
582+
"displayname" : "default",
583+
"value" : "default"
584+
},
585+
{
586+
"displayname" : "private",
587+
"value" : "private"
588+
},
589+
{
590+
"displayname" : "vpe",
591+
"value" : "vpe"
592+
},
593+
{
594+
"displayname": "link",
595+
"value": "link"
596+
}
597+
]
598+
},
599+
{
600+
"key": "is_vpc_cluster"
601+
},
602+
{
603+
"key": "wait_till"
604+
},
605+
{
606+
"key": "wait_till_timeout"
607+
},
608+
{
609+
"key": "log_analysis_enabled"
610+
},
611+
{
612+
"key": "log_analysis_agent_tags"
613+
},
614+
{
615+
"key": "log_analysis_add_cluster_name"
616+
},
617+
{
618+
"key": "log_analysis_ingestion_key"
619+
},
620+
{
621+
"key": "log_analysis_secret_name"
622+
},
623+
{
624+
"key": "log_analysis_instance_region"
625+
},
626+
{
627+
"key": "log_analysis_endpoint_type",
628+
"options":[
629+
{
630+
"displayname" : "private",
631+
"value" : "private"
632+
},
633+
{
634+
"displayname" : "public",
635+
"value" : "public"
636+
}
637+
]
638+
},
639+
{
640+
"key": "log_analysis_agent_custom_line_inclusion"
641+
},
642+
{
643+
"key": "log_analysis_agent_custom_line_exclusion"
644+
},
645+
{
646+
"key": "log_analysis_agent_name"
647+
},
648+
{
649+
"key": "log_analysis_agent_namespace"
650+
},
651+
{
652+
"key": "log_analysis_agent_tolerations"
653+
},
654+
{
655+
"key": "cloud_monitoring_enabled"
656+
},
657+
{
658+
"key": "cloud_monitoring_access_key",
659+
"required": true
660+
},
661+
{
662+
"key": "cloud_monitoring_secret_name"
663+
},
664+
{
665+
"key": "cloud_monitoring_instance_region"
666+
},
667+
{
668+
"key": "cloud_monitoring_endpoint_type",
669+
"options":[
670+
{
671+
"displayname" : "private",
672+
"value" : "private"
673+
},
674+
{
675+
"displayname" : "public",
676+
"value" : "public"
677+
}
678+
]
679+
},
680+
{
681+
"key": "cloud_monitoring_metrics_filter"
682+
},
683+
{
684+
"key": "cloud_monitoring_agent_tags"
685+
},
686+
{
687+
"key": "cloud_monitoring_add_cluster_name"
688+
},
689+
{
690+
"key": "cloud_monitoring_agent_name"
691+
},
692+
{
693+
"key": "cloud_monitoring_agent_namespace"
694+
},
695+
{
696+
"key": "cloud_monitoring_agent_tolerations"
697+
},
698+
{
699+
"key": "logs_agent_enabled"
700+
},
701+
{
702+
"key": "logs_agent_name"
703+
},
704+
{
705+
"key": "logs_agent_namespace"
706+
},
707+
{
708+
"key": "logs_agent_trusted_profile",
709+
"required": true
710+
},
711+
{
712+
"key": "logs_agent_iam_api_key",
713+
"required": true
714+
},
715+
{
716+
"key": "logs_agent_tolerations"
717+
},
718+
{
719+
"key": "logs_agent_additional_log_source_paths"
720+
},
721+
{
722+
"key": "logs_agent_exclude_log_source_paths"
723+
},
724+
{
725+
"key": "logs_agent_selected_log_source_paths"
726+
},
727+
{
728+
"key": "logs_agent_log_source_namespaces"
729+
},
730+
{
731+
"key": "logs_agent_iam_mode"
732+
},
733+
{
734+
"key": "logs_agent_iam_environment"
735+
},
736+
{
737+
"key": "logs_agent_additional_metadata"
738+
},
739+
{
740+
"key": "logs_agent_enable_scc"
741+
},
742+
{
743+
"key": "cloud_logs_ingress_endpoint",
744+
"required": true
745+
},
746+
{
747+
"key": "cloud_logs_ingress_port"
748+
}
749+
],
565750
"architecture": {
566-
"descriptions": "This architecture supports the deployment of IBM Log Analysis and IBM Cloud Monitoring agents on an existing Red Hat OpenShift cluster on a secure landing zone.",
751+
"descriptions": "This architecture supports the deployment of IBM Log Analysis(DEPRECATED), IBM Cloud Monitoring and IBM Cloud Logs agent on an existing Red Hat OpenShift cluster.",
567752
"features": [
568753
{
569-
"title": "Works with the secure landing zone.",
570-
"description": "Works with the Red Hat OpenShift cluster on a secure landing zone."
754+
"title": "Works with any openshit ir k8s cluster",
755+
"description": "Works with the Red Hat OpenShift cluster."
756+
},
757+
{
758+
"title": "Deploys the IBM Log Analysis agent on an existing cluster.",
759+
"description": "Deploys the IBM Log Analysis agent on an existing Red Hat OpenShift cluster."
571760
},
572761
{
573-
"title": "Deploys the IBM Log Analysis agent on an existing cluster on a secure landing zone.",
574-
"description": "Deploys the IBM Log Analysis agent on an existing Red Hat OpenShift cluster on a secure landing zone."
762+
"title": "Deploys the IBM Cloud Monitoring agent on an existing cluster.",
763+
"description": "Deploys the IBM Cloud Monitoring agent on an existing Red Hat OpenShift cluster."
575764
},
576765
{
577-
"title": "Deploys the IBM Cloud Monitoring agent on an existing cluster on a secure landing zone.",
578-
"description": "Deploys the IBM Cloud Monitoring agent on an existing Red Hat OpenShift cluster on a secure landing zone."
766+
"title": "Deploys the IBM Logs agent on an existing cluster.",
767+
"description": "Deploys the IBM Logs agent on an existing Red Hat OpenShift cluster."
579768
}
580769
],
581770
"diagrams": [

reference-architecture/deployable-architecture-observability-agents.svg

Lines changed: 1 addition & 1 deletion
Loading

solutions/agents/README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@
22

33
This architecture deploys the following observability agents on a Red Hat OpenShift cluster:
44

5-
* Log Analysis agent
5+
* Log Analysis agent(DEPRECATED)
66
* Cloud Monitoring agent
7+
* Cloud Logs agent
78

89
## Before you begin
910

1011
* Make sure that the Red Hat OpenShift Cluster is deployed.
1112

12-
* Make sure that the observability instances (Log Analysis and Cloud Monitoring) for which specific agents are required are deployed.
13+
* Make sure that the observability instances (Cloud Logs and Cloud Monitoring) for which specific agents are required are deployed.

solutions/agents/main.tf

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ data "ibm_container_cluster_config" "cluster_config" {
1111

1212
module "observability_agents" {
1313
source = "terraform-ibm-modules/observability-agents/ibm"
14-
version = "1.29.0"
14+
version = "1.30.1"
1515
cluster_id = var.cluster_id
1616
cluster_resource_group_id = var.cluster_resource_group_id
1717
cluster_config_endpoint_type = var.cluster_config_endpoint_type
@@ -43,4 +43,22 @@ module "observability_agents" {
4343
cloud_monitoring_instance_region = var.cloud_monitoring_instance_region
4444
cloud_monitoring_agent_tolerations = var.cloud_monitoring_agent_tolerations
4545
cloud_monitoring_add_cluster_name = var.cloud_monitoring_add_cluster_name
46+
# Logs Agent
47+
logs_agent_enabled = var.logs_agent_enabled
48+
logs_agent_name = var.logs_agent_name
49+
logs_agent_namespace = var.logs_agent_namespace
50+
logs_agent_trusted_profile = var.logs_agent_trusted_profile
51+
logs_agent_iam_api_key = var.logs_agent_iam_api_key
52+
logs_agent_tolerations = var.logs_agent_tolerations
53+
logs_agent_additional_log_source_paths = var.logs_agent_additional_log_source_paths
54+
logs_agent_exclude_log_source_paths = var.logs_agent_exclude_log_source_paths
55+
logs_agent_selected_log_source_paths = var.logs_agent_selected_log_source_paths
56+
logs_agent_log_source_namespaces = var.logs_agent_log_source_namespaces
57+
logs_agent_iam_mode = var.logs_agent_iam_mode
58+
logs_agent_iam_environment = var.logs_agent_iam_environment
59+
logs_agent_additional_metadata = var.logs_agent_additional_metadata
60+
logs_agent_enable_scc = var.logs_agent_enable_scc
61+
cloud_logs_ingress_endpoint = var.cloud_logs_ingress_endpoint
62+
cloud_logs_ingress_port = var.cloud_logs_ingress_port
63+
is_vpc_cluster = var.is_vpc_cluster
4664
}

solutions/agents/provider.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@ provider "helm" {
1212
host = data.ibm_container_cluster_config.cluster_config.host
1313
token = data.ibm_container_cluster_config.cluster_config.token
1414
}
15+
# IBM Cloud credentials are required to authenticate to the helm repo
16+
registry {
17+
url = "oci://icr.io/ibm/observe/logs-agent-helm"
18+
username = "iamapikey"
19+
password = var.ibmcloud_api_key
20+
}
1521
}
1622

1723
# Retrieve information about an existing VPC cluster

0 commit comments

Comments
 (0)