diff --git a/cmoa_install.yaml b/cmoa_install.yaml index 424a4e9..edaefa7 100755 --- a/cmoa_install.yaml +++ b/cmoa_install.yaml @@ -5,7 +5,9 @@ environment: KUBECONFIG: /root/.kube/ansible_config roles: -# - role: cmoa_os_setting + - role: cmoa_os_setting - role: cmoa_install delegate_to: 127.0.0.1 +# --user ubuntu --ask-pass --ask-become-pass + diff --git a/inventory_cmoa b/inventory_cmoa index 8ffa0f3..448c3bd 100755 --- a/inventory_cmoa +++ b/inventory_cmoa @@ -1,11 +1,11 @@ [master] -10.10.43.210 +10.10.43.200 [worker1] -10.10.43.211 +10.10.43.201 [worker2] -10.10.43.212 +10.10.43.202 [cluster:children] master diff --git a/roles/agent_os_setting/defaults/main.yml b/roles/agent_os_setting/defaults/main.yml index 5f5089e..e5403c6 100644 --- a/roles/agent_os_setting/defaults/main.yml +++ b/roles/agent_os_setting/defaults/main.yml @@ -17,6 +17,10 @@ kubernetes_metric_server_file: "{{ role_path }}/files/components.yaml" ansible_kube_config: "/tmp/agent_config" +crio: + os: xUbuntu_20.04 + version: 1.26 + containerd_config: version: 2 root: /var/lib/containerd diff --git a/roles/agent_os_setting/tasks/01-ubuntu-os-crio.yml b/roles/agent_os_setting/tasks/01-ubuntu-os-crio.yml index a80216e..9db8e7d 100644 --- a/roles/agent_os_setting/tasks/01-ubuntu-os-crio.yml +++ b/roles/agent_os_setting/tasks/01-ubuntu-os-crio.yml @@ -1,9 +1,27 @@ --- -- name: Add crio yum repository - command: sudo curl -L -o /etc/yum.repos.d/devel:kubic:libcontainers:stable.repo https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/CentOS_7/devel:kubic:libcontainers:stable.repo +- name: Import GPG key_1 + apt_key: + url: https://download.opensuse.org/repositories/devel:kubic:libcontainers:stable:cri-o:{{ crio.version }}/{{ crio.os }}/Release.key + state: present + become: true -- name: Add crio yum repository - command: sudo curl -L -o /etc/yum.repos.d/devel:kubic:libcontainers:stable:cri-o:1.23.repo https://download.opensuse.org/repositories/devel:kubic:libcontainers:stable:cri-o:1.23/CentOS_7/devel:kubic:libcontainers:stable:cri-o:1.23.repo +- name: Import GPG key_2 + apt_key: + url: https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/{{ crio.os }}/Release.key + state: present + become: true + +- name: Add crio repository_1 + apt_repository: + repo: deb https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/{{crio.os }}/ / + state: present + filename: devel:kubic:libcontainers:stable.list + +- name: Add crio repository_2 + apt_repository: + repo: deb http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable:/cri-o:/{{ crio.version }}/{{ crio.os }}/ / + state: present + filename: devel:kubic:libcontainers:stable:cri-o:{{ crio.version }}.list - name: Create crio configuration directory file: @@ -19,8 +37,9 @@ - name: Install required packages apt: - name: - - crio + name: ['cri-o', 'cri-o-runc'] + state: present + update_cache: yes notify: - Reload systemd configuration - Restart crio service diff --git a/roles/cmoa_install/defaults/main.yml b/roles/cmoa_install/defaults/main.yml index 7b40f0b..91de738 100644 --- a/roles/cmoa_install/defaults/main.yml +++ b/roles/cmoa_install/defaults/main.yml @@ -4,13 +4,13 @@ helm_version: v3.10.3 # cmoa info cmoa_namespace: imxc -cmoa_version: rel3.4.9 +cmoa_version: rel3.5.0 # files/00-default in role docker_secret_file: secret_nexus.yaml # all, jaeger, jspd -imxc_ui: all +#imxc_ui: jspd # [docker_config_path] docker_config_nexus: dockerconfig/docker_config_nexus.json @@ -35,6 +35,11 @@ elasticsearch_service_name: elasticsearch elasticsearch_service_port: 9200 elasticsearch_nodePort: 30200 +# [postgres] +postgres_service_name: postgres +postgres_service_port: 5432 +postgres_nodePort: 32431 + # [Keycloak] # Keycloak configuration settings keycloak_http_port: 31082 @@ -55,7 +60,7 @@ keycloak_clients: - name: 'authorization_server' client_id: authorization_server realm: exem - redirect_uris: "http://{{ ansible_default_ipv4.address }}:31080/*,http://{{ ansible_default_ipv4.address }}:31084/*,http://localhost:8080/*,http://localhost:8081/*" + redirect_uris: "http://{{ ansible_default_ipv4.address }}:31080/*,http://localhost:8080/*,http://localhost:8081/*" public_client: True # default ip/version (not change) diff --git a/roles/cmoa_install/files/03-ddl-dml/elasticsearch/es-ddl-put.sh b/roles/cmoa_install/files/03-ddl-dml/elasticsearch/es-ddl-put.sh index 2ee39f2..50eda4b 100755 --- a/roles/cmoa_install/files/03-ddl-dml/elasticsearch/es-ddl-put.sh +++ b/roles/cmoa_install/files/03-ddl-dml/elasticsearch/es-ddl-put.sh @@ -1,8 +1,9 @@ #!/bin/bash -kubectl -n imxc wait --for=condition=ready pod/elasticsearch-1 --timeout=600s - namespace=$1 + +kubectl -n ${namespace} wait --for=condition=ready pod/elasticsearch-1 --timeout=600s + export ES_NODEPORT=`kubectl -n ${namespace} get svc elasticsearch -o jsonpath='{.spec.ports[*].nodePort}'` export MASTER_IP=`kubectl get node -o wide | grep control-plane | awk '{print $6}'` diff --git a/roles/cmoa_install/files/03-ddl-dml/postgres/patch/postgres_patch_3.5.0.psql b/roles/cmoa_install/files/03-ddl-dml/postgres/patch/postgres_patch_3.5.0.psql new file mode 100644 index 0000000..42ab2cf --- /dev/null +++ b/roles/cmoa_install/files/03-ddl-dml/postgres/patch/postgres_patch_3.5.0.psql @@ -0,0 +1,147 @@ +-- CLOUD-12000 Disk R/W 메트릭 변경 - Read, Write 반대로 설정 +UPDATE metric_meta2 SET expr = 'sum by(xm_clst_id, xm_pod_id, xm_cont_name, data_type) (label_replace(rate(container_fs_writes_bytes_total{xm_entity_type="Container",{filter}}[1m]), "data_type", "Write" , "", "") or label_replace(rate(container_fs_reads_bytes_total{xm_entity_type="Container",{filter}}[1m]), "data_type", "Read", "" , ""))' WHERE id ='container_disk_read_write_byte'; +UPDATE metric_meta2 SET expr = 'sum by(xm_clst_id, xm_pod_id, data_type) (label_replace(rate(container_fs_writes_bytes_total{xm_entity_type="Container",{filter}}[1m]), "data_type", "Write" , "", "") or label_replace(rate(container_fs_reads_bytes_total{xm_entity_type="Container",{filter}}[1m]), "data_type", "Read", "" , ""))' WHERE id ='pod_disk_read_write_byte'; +UPDATE menu_meta SET description = 'My List' WHERE url = 'documentDashboard'; +UPDATE menu_meta SET description = 'Shared List' WHERE url = 'templateDashboard'; +UPDATE auth_resource2 SET description = 'My List' WHERE id = 48; +UPDATE auth_resource2 SET description = 'Shared List' WHERE id = 49; +UPDATE auth_resource3 SET description = 'My List' WHERE id = 48; +UPDATE auth_resource3 SET description = 'Shared List' WHERE id = 49; +UPDATE auth_resource3 SET description = 'menu|Dashboards|My List' WHERE id = 110; +UPDATE auth_resource3 SET description = 'menu|Dashboards|hared List' WHERE id = 111; + +-- Dashboard 추가 (Postgres , Redis , Traefik , MySQL / MariaDB , Nginx-Ingress) +INSERT INTO public.auth_resource3 (name, is_deleted, tenant_id) VALUES ('dashboard|admin|Postgres', false, null); +INSERT INTO public.auth_resource3 (name, is_deleted, tenant_id) VALUES ('dashboard|admin|Redis', false, null); +INSERT INTO public.auth_resource3 (name, is_deleted, tenant_id) VALUES ('dashboard|admin|Traefik', false, null); +INSERT INTO public.auth_resource3 (name, is_deleted, tenant_id) VALUES ('dashboard|admin|MySQL / MariaDB', false, null); +INSERT INTO public.auth_resource3 (name, is_deleted, tenant_id) VALUES ('dashboard|admin|Nginx-Ingress', false, null); + +INSERT INTO public.dashboard2 (id, created_date, modified_date, layout, title, auth_resource_id, created_by, modified_by, description, "share") + VALUES(nextval('hibernate_sequence'), '2020-04-28 09:23:14.286', '2020-04-28 09:23:44.213', '[{"i":"widget0","widget":{"header":"default-header","body":"label-view","title":" "},"w":48,"h":3,"minW":2,"minH":1,"maxW":48,"maxH":36,"component":{"api":{},"visualization":{"background":null,"fontSize":18,"textAlign":"left","padding":[0,18],"sideways":false,"fontWeight":"bold","text":"Resource Utilization"}},"x":0,"y":9,"static":true},{"i":"widget1","widget":{"header":"default-header","body":"line-chart-view","title":"CPU Usage (%)","description":"postgres에 대한 pod들의 cpu 사용량"},"w":12,"h":10,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":"cloudmoa","namespace":"imxc","metricId":"container_cpu_usage_by_workload","entityId":"postgres","type":"workload"}},"visualization":{"showLegend":true}},"x":0,"y":12,"static":true},{"i":"widget2","widget":{"header":"default-header","body":"line-chart-view","title":"Memory Usage (GiB)"},"w":12,"h":10,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":"cloudmoa","namespace":"imxc","metricId":"container_memory_working_set_bytes_by_workload","entityId":"postgres","type":"workload"}},"visualization":{"showLegend":true}},"x":12,"y":12,"static":true},{"i":"widget4","widget":{"header":"default-header","body":"line-chart-view","title":"Network Recieved (KiB)"},"w":12,"h":10,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":"cloudmoa","namespace":"imxc","metricId":"container_network_receive_by_workload","entityId":"postgres","type":"workload"}},"visualization":{"showLegend":true,"background":null,"fontSize":12,"textAlign":"center","padding":[0,18],"sideways":false}},"x":36,"y":12,"static":true},{"i":"widget3","widget":{"header":"default-header","body":"line-chart-view","title":"Network Transmit (KiB)"},"w":12,"h":10,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":"cloudmoa","namespace":"imxc","metricId":"container_network_transmit_by_workload","entityId":"postgres","type":"workload"}},"visualization":{"showLegend":true}},"x":24,"y":12,"static":true},{"i":"widget5","widget":{"header":"default-header","body":"label-view","title":" "},"w":48,"h":3,"minW":2,"minH":1,"maxW":48,"maxH":36,"component":{"api":{},"visualization":{"background":null,"fontSize":18,"textAlign":"left","padding":[0,18],"sideways":false,"fontWeight":"bold","text":"General Statics"}},"x":0,"y":22,"static":true},{"i":"widget6","widget":{"header":"default-header","body":"horizontal-bar-chart-view","title":"Lock mode"},"w":24,"h":11,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":false,"clusterId":"cloudmoa","namespace":"","metricId":"pg_count_by_lockmode","entityId":"","type":"PostgreSQL","filter":""}},"visualization":{"showLegend":true}},"x":0,"y":25,"static":true},{"i":"widget7","widget":{"header":"default-header","body":"horizontal-bar-chart-view","title":"Connection By DB and State"},"w":24,"h":11,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":false,"clusterId":"cloudmoa","namespace":"","metricId":"pg_count_by_dbname_state","entityId":"","type":"PostgreSQL","filter":""}},"visualization":{"showLegend":true}},"x":24,"y":25,"static":true},{"i":"widget8","widget":{"header":"default-header","body":"stat-view","title":"Number of Client Connection"},"w":17,"h":6,"minW":6,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":true,"range":false,"clusterId":"cloudmoa","namespace":"","metricId":"pg_stat_activity_count","entityId":"","type":"PostgreSQL","filter":""}},"visualization":{"showGauge":false,"showPercent":false,"min":null,"max":null,"decimals":2,"baseColor":"#409EFF","thresholds":[],"showLegend":true}},"x":15,"y":3,"static":true},{"i":"widget9","widget":{"header":"default-header","body":"label-view","title":" "},"w":48,"h":3,"minW":2,"minH":1,"maxW":48,"maxH":36,"component":{"api":{},"visualization":{"background":null,"fontSize":18,"textAlign":"left","padding":[0,18],"sideways":false,"fontWeight":"bold","text":"Overview"}},"x":0,"y":0,"static":true},{"i":"widget11","widget":{"header":"default-header","body":"stat-view","title":"Lock Count"},"w":16,"h":6,"minW":6,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":true,"range":false,"clusterId":"cloudmoa","namespace":"","metricId":"pg_locks_count","entityId":"","type":"PostgreSQL","filter":""}},"visualization":{"showGauge":false,"showPercent":false,"min":null,"max":null,"decimals":2,"baseColor":"#409EFF","thresholds":[]}},"x":32,"y":3,"static":true},{"i":"widget10","widget":{"header":"default-header","body":"stat-view","title":"Up"},"w":15,"h":6,"minW":6,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":true,"range":false,"clusterId":"cloudmoa","namespace":"","metricId":"pg_up","entityId":"","type":"PostgreSQL","filter":""}},"visualization":{"showGauge":false,"showPercent":false,"min":null,"max":null,"decimals":2,"baseColor":"#409EFF","thresholds":[{"color":"#32AC2D","value":"1"}]}},"x":0,"y":3,"static":true},{"i":"widget12","widget":{"header":"default-header","body":"line-chart-view","title":"Buffer Cache Hit Ratio (%)"},"w":24,"h":11,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":"cloudmoa","namespace":"","metricId":"pg_stat_database_cache_hit_ratio","entityId":"","type":"PostgreSQL","filter":""}},"visualization":{"showLegend":true,"showGauge":false,"showPercent":false,"min":null,"max":null,"decimals":2,"baseColor":"#409EFF","thresholds":[]}},"x":0,"y":36,"static":true},{"i":"widget13","widget":{"header":"default-header","body":"line-chart-view","title":"Read/Write spent time by file blocks"},"w":24,"h":11,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":"cloudmoa","namespace":"","metricId":"pg_stat_database_blk_read_write_time","entityId":"","type":"PostgreSQL","filter":""}},"visualization":{"showLegend":true,"row":8,"column":["date","value"]}},"x":24,"y":36,"static":true},{"i":"widget14","widget":{"header":"default-header","body":"label-view","title":" "},"w":48,"h":3,"minW":2,"minH":1,"maxW":48,"maxH":36,"component":{"api":{},"visualization":{"background":null,"fontSize":18,"textAlign":"left","padding":[0,18],"sideways":false,"fontWeight":"bold","text":"Block"}},"x":0,"y":47,"static":true},{"i":"widget15","widget":{"header":"default-header","body":"line-chart-view","title":"Number of Disk Blocks Read"},"w":48,"h":11,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":"cloudmoa","namespace":"","metricId":"pg_stat_database_blks_read","entityId":"","type":"PostgreSQL","filter":""}},"visualization":{"showLegend":true}},"x":0,"y":61,"static":true},{"i":"widget17","widget":{"header":"default-header","body":"line-chart-view","title":"Number of Rows Inserted"},"w":24,"h":11,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":"cloudmoa","namespace":"","metricId":"pg_stat_database_tup_inserted","entityId":"","type":"PostgreSQL","filter":""}},"visualization":{"showLegend":true}},"x":0,"y":75,"static":true},{"i":"widget18","widget":{"header":"default-header","body":"line-chart-view","title":"Time Spent Reading Data File Blocks (ms)"},"w":24,"h":11,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":"cloudmoa","namespace":"","metricId":"pg_stat_database_blk_read_time","entityId":"","type":"PostgreSQL","filter":""}},"visualization":{"showLegend":true}},"x":0,"y":50,"static":true},{"i":"widget19","widget":{"header":"default-header","body":"line-chart-view","title":"Time Spent Writing Data File Blocks (ms)"},"w":24,"h":11,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":"cloudmoa","namespace":"","metricId":"pg_stat_database_blk_write_time","entityId":"","type":"PostgreSQL","filter":""}},"visualization":{"showLegend":true}},"x":24,"y":50,"static":true},{"i":"widget20","widget":{"header":"default-header","body":"label-view","title":" "},"w":48,"h":3,"minW":2,"minH":1,"maxW":48,"maxH":36,"component":{"api":{},"visualization":{"background":null,"fontSize":18,"textAlign":"left","padding":[0,18],"sideways":false,"fontWeight":"bold","text":"Row"}},"x":0,"y":72,"static":true},{"i":"widget16","widget":{"header":"default-header","body":"line-chart-view","title":"Number of Rows Updated"},"w":24,"h":11,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":"cloudmoa","namespace":"","metricId":"pg_stat_database_tup_updated","entityId":"","type":"PostgreSQL","filter":""}},"visualization":{"showLegend":true}},"x":24,"y":75,"static":true},{"i":"widget21","widget":{"header":"default-header","body":"stack-bar-chart-view","title":"Number of Transactions Committed"},"w":24,"h":10,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":"cloudmoa","namespace":"","metricId":"pg_stat_database_xact_commit","entityId":"","type":"PostgreSQL","filter":""}},"visualization":{"showLegend":true}},"x":0,"y":110,"static":true},{"i":"widget22","widget":{"header":"default-header","body":"line-chart-view","title":"Number of Rows Returned"},"w":48,"h":10,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":"cloudmoa","namespace":"","metricId":"pg_stat_database_tup_returned","entityId":"","type":"PostgreSQL","filter":""}},"visualization":{"showLegend":true}},"x":0,"y":97,"static":true},{"i":"widget23","widget":{"header":"default-header","body":"line-chart-view","title":"Number of Rows Fetched"},"w":24,"h":11,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":"cloudmoa","namespace":"","metricId":"pg_stat_database_tup_fetched","entityId":"","type":"PostgreSQL","filter":""}},"visualization":{"showLegend":true}},"x":24,"y":86,"static":true},{"i":"widget24","widget":{"header":"default-header","body":"line-chart-view","title":"Number of Rows Deleted"},"w":24,"h":11,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":"cloudmoa","namespace":"","metricId":"pg_stat_database_tup_deleted","entityId":"","type":"PostgreSQL","filter":""}},"visualization":{"showLegend":true}},"x":0,"y":86,"static":true},{"i":"widget25","widget":{"header":"default-header","body":"label-view","title":" "},"w":48,"h":3,"minW":2,"minH":1,"maxW":48,"maxH":36,"component":{"api":{},"visualization":{"background":null,"fontSize":18,"textAlign":"left","padding":[0,18],"sideways":false,"fontWeight":"bold","text":"Transaction"}},"x":0,"y":107,"static":true},{"i":"widget26","widget":{"header":"default-header","body":"stack-bar-chart-view","title":"Number of Transactions Rolled Back"},"w":24,"h":10,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":"cloudmoa","namespace":"","metricId":"pg_stat_database_xact_rollback","entityId":"","type":"PostgreSQL","filter":""}},"visualization":{"showLegend":true}},"x":24,"y":110,"static":true}]', + 'Postgres', (select id from auth_resource3 where name='dashboard|admin|Postgres'), 'admin', 'admin', NULL, true); +INSERT INTO public.dashboard2 (id, created_date, modified_date, layout, title, auth_resource_id, created_by, modified_by, description, "share") + VALUES(nextval('hibernate_sequence'), '2020-04-28 09:23:14.286', '2020-04-28 09:23:44.213', '[{"i":"widget0","widget":{"header":"default-header","body":"line-chart-view","title":"CPU Usage (%)","description":"Redis Pod에 대한 CPU 사용량"},"w":12,"h":10,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":"cloudmoa","namespace":"imxc","metricId":"container_cpu_usage_core_by_workload","entityId":"redis-master,redis-slave","type":"workload","filter":""}},"visualization":{"showLegend":true}},"x":0,"y":7,"static":true},{"i":"widget1","widget":{"header":"default-header","body":"line-chart-view","title":"Memory Usage (GiB)"},"w":12,"h":10,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":"cloudmoa","namespace":"imxc","metricId":"container_memory_usage_bytes_by_workload","entityId":"redis-master,redis-slave","type":"workload","filter":""}},"visualization":{"showLegend":true}},"x":12,"y":7,"static":true},{"i":"widget2","widget":{"header":"default-header","body":"line-chart-view","title":"Network Transmit (KB)"},"w":12,"h":10,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":"cloudmoa","namespace":"imxc","metricId":"container_network_transmit_by_workload","entityId":"redis-master,redis-slave","type":"workload"}},"visualization":{"showLegend":true}},"x":24,"y":7,"static":true},{"i":"widget3","widget":{"header":"default-header","body":"line-chart-view","title":"Network Recieved (KiB)"},"w":12,"h":10,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":"cloudmoa","namespace":"imxc","metricId":"container_network_receive_by_workload","entityId":"redis-master,redis-slave","type":"workload"}},"visualization":{"showLegend":true}},"x":36,"y":7,"static":true},{"i":"widget4","widget":{"header":"default-header","body":"stat-view","title":"Redis Up Count"},"w":12,"h":7,"minW":6,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":true,"range":false,"clusterId":"cloudmoa","namespace":"","metricId":"redis_up","entityId":"","type":"Redis","filter":""}},"visualization":{"showGauge":false,"showPercent":false,"min":null,"max":null,"decimals":2,"baseColor":"#409EFF","thresholds":[{"color":"#32AC2D","value":"1"}]}},"x":0,"y":0,"static":true},{"i":"widget5","widget":{"header":"default-header","body":"stat-view","title":"Connected Clients Count"},"w":12,"h":7,"minW":6,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":true,"range":false,"clusterId":"cloudmoa","namespace":"","metricId":"redis_connected_clients","entityId":"","type":"Redis","filter":""}},"visualization":{"showGauge":false,"showPercent":false,"min":null,"max":null,"decimals":2,"baseColor":"#409EFF","thresholds":[]}},"x":12,"y":0,"static":true},{"i":"widget6","widget":{"header":"default-header","body":"stat-view","title":"Blocked Client Count"},"w":12,"h":7,"minW":6,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":true,"range":false,"clusterId":"cloudmoa","namespace":"","metricId":"redis_blocked_clients","entityId":"","type":"Redis","filter":""}},"visualization":{"showGauge":false,"showPercent":false,"min":null,"max":null,"decimals":null,"baseColor":"#409EFF","thresholds":[],"showLegend":true}},"x":36,"y":0,"static":true},{"i":"widget7","widget":{"header":"default-header","body":"horizontal-bar-chart-view","title":"Calls per command"},"w":24,"h":11,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":false,"clusterId":"cloudmoa","namespace":"","metricId":"redis_commands_total","entityId":"","type":"Redis","filter":""}},"visualization":{"showLegend":true,"showGauge":false,"showPercent":false,"min":null,"max":null,"decimals":null,"baseColor":"#409EFF","thresholds":[]}},"x":0,"y":26,"static":true},{"i":"widget8","widget":{"header":"default-header","body":"line-chart-view","title":"Command duration"},"w":24,"h":11,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":"cloudmoa","namespace":"","metricId":"redis_commands_duration_seconds","entityId":"","type":"Redis","filter":"","jspdCluster":null}},"visualization":{"showLegend":true}},"x":24,"y":26,"static":true},{"i":"widget9","widget":{"header":"default-header","body":"stat-view","title":"Rejected Client Count"},"w":12,"h":7,"minW":6,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":true,"range":false,"clusterId":"cloudmoa","namespace":"","metricId":"redis_rejected_connections","entityId":"","type":"Redis","filter":""}},"visualization":{"showGauge":false,"showPercent":false,"min":null,"max":null,"decimals":2,"baseColor":"#409EFF","thresholds":[]}},"x":24,"y":0,"static":true},{"i":"widget10","widget":{"header":"default-header","body":"line-chart-view","title":"DB Key"},"w":24,"h":11,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":"cloudmoa","namespace":"","metricId":"redis_db_keys","entityId":"","type":"Redis","filter":""}},"visualization":{"showLegend":true}},"x":0,"y":37,"static":true},{"i":"widget11","widget":{"header":"default-header","body":"line-chart-view","title":"DB Expired Key"},"w":24,"h":11,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":"cloudmoa","namespace":"","metricId":"redis_expired_keys","entityId":"","type":"Redis","filter":""}},"visualization":{"showLegend":true}},"x":24,"y":37,"static":true},{"widget":{"header":"default-header","body":"stat-view","title":"Connected Slave"},"w":16,"h":9,"minW":6,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":true,"range":false,"clusterId":"cloudmoa","namespace":"","metricId":"redis_connected_slaves","entityId":"","type":"Redis","filter":""}},"visualization":{"showLegend":true,"showGauge":false,"showPercent":false,"min":null,"max":null,"decimals":2,"baseColor":"#409EFF","thresholds":[]}},"i":"widget12","static":true,"x":0,"y":17},{"widget":{"header":"default-header","body":"line-chart-view","title":"Slave Offset Bytes"},"w":16,"h":9,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":"cloudmoa","namespace":"","metricId":"redis_connected_slave_offset_bytes","entityId":"","type":"Redis","filter":""}},"visualization":{"showLegend":true}},"i":"widget13","static":true,"x":16,"y":17},{"widget":{"header":"default-header","body":"line-chart-view","title":"Slave Lag Seconds"},"w":16,"h":9,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":"cloudmoa","namespace":"","metricId":"redis_connected_slave_lag_seconds","entityId":"","type":"Redis","filter":""}},"visualization":{"showLegend":true}},"i":"widget14","static":true,"x":32,"y":17}]', + 'Redis', (select id from auth_resource3 where name='dashboard|admin|Redis'), 'admin', 'admin', NULL, true); +INSERT INTO public.dashboard2 (id, created_date, modified_date, layout, title, auth_resource_id, created_by, modified_by, description, "share") + VALUES(nextval('hibernate_sequence'), '2020-04-28 09:23:14.286', '2020-04-28 09:23:44.213', '[{"i":"widget0","widget":{"header":"default-header","body":"stat-view","title":"4xx Error Per Seconds"},"w":8,"h":7,"minW":6,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":true,"range":false,"clusterId":"cloudmoa","namespace":"","metricId":"traefik_4xx_error_rate_last_5m","entityId":"","type":"Traefik","filter":""}},"visualization":{"showGauge":false,"showPercent":false,"min":null,"max":null,"decimals":2,"baseColor":"rgba(255, 0, 0, 1)","thresholds":[],"showLegend":true}},"x":8,"y":0,"static":true},{"i":"widget1","widget":{"header":"default-header","body":"stat-view","title":"5xx Error Per Seconds"},"w":8,"h":7,"minW":6,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":true,"range":false,"clusterId":"cloudmoa","namespace":"","metricId":"traefik_5xx_error_rate_last_5m","entityId":"","type":"Traefik","filter":""}},"visualization":{"showGauge":false,"showPercent":false,"min":null,"max":null,"decimals":2,"baseColor":"rgba(255, 0, 0, 1)","thresholds":[]}},"x":16,"y":0,"static":true},{"i":"widget2","widget":{"header":"default-header","body":"line-chart-view","title":"Pod CPU Utilization (Core)"},"w":24,"h":9,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":"cloudmoa","namespace":"traefik","metricId":"container_cpu_usage_core_by_workload","entityId":"deploymentList,traefik","type":"workload"}},"visualization":{"showLegend":true}},"x":0,"y":7,"static":true},{"i":"widget3","widget":{"header":"default-header","body":"stat-view","title":"Total Request Per Seconds"},"w":8,"h":7,"minW":6,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":true,"range":false,"clusterId":"cloudmoa","namespace":"","metricId":"traefik_http_requests_rate_last_5m","entityId":"","type":"Traefik","filter":""}},"visualization":{"showGauge":false,"showPercent":false,"min":null,"max":null,"decimals":2,"baseColor":"#409EFF","thresholds":[]}},"x":0,"y":0,"static":true},{"i":"widget4","widget":{"header":"default-header","body":"stat-view","title":"Bad Request Count (10m)"},"w":8,"h":7,"minW":6,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":true,"range":false,"clusterId":"cloudmoa","namespace":"","metricId":"traefik_http_requests_bad_total_last_10m","entityId":"","type":"Traefik","filter":""}},"visualization":{"showGauge":false,"showPercent":false,"min":null,"max":null,"decimals":null,"baseColor":"rgba(255, 0, 0, 1)","thresholds":[]}},"x":32,"y":0,"static":true},{"i":"widget5","widget":{"header":"default-header","body":"stat-view","title":"Avg. Response Duration (10m)"},"w":8,"h":7,"minW":6,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":true,"range":false,"clusterId":"cloudmoa","namespace":"","metricId":"traefik_http_response_time_ms","entityId":"","type":"Traefik","filter":""}},"visualization":{"showGauge":false,"showPercent":false,"min":null,"max":null,"decimals":2,"baseColor":"rgba(64, 158, 255, 1)","thresholds":[]}},"x":40,"y":0,"static":true},{"i":"widget6","widget":{"header":"default-header","body":"stat-view","title":"Total Request Count (10m)"},"w":8,"h":7,"minW":6,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":true,"range":false,"clusterId":"cloudmoa","namespace":"","metricId":"traefik_http_requests_total_last_10m","entityId":"","type":"Traefik","filter":""}},"visualization":{"showGauge":false,"showPercent":false,"min":null,"max":null,"decimals":null,"baseColor":"#409EFF","thresholds":[]}},"x":24,"y":0,"static":true},{"i":"widget7","widget":{"header":"default-header","body":"line-chart-view","title":"Pod Memory Utilization (GiB)"},"w":24,"h":9,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":"cloudmoa","namespace":"traefik","metricId":"container_memory_working_set_bytes_by_workload","entityId":"deploymentList,traefik","type":"workload"}},"visualization":{"showLegend":true}},"x":24,"y":7,"static":true},{"widget":{"header":"default-header","body":"line-chart-view","title":"ENTRYPOINT - Open Connections"},"w":24,"h":9,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":"cloudmoa","namespace":"","metricId":"traefik_entrypoint_open_connections","entityId":"","type":"Traefik","filter":""}},"visualization":{"showLegend":true}},"i":"widget8","static":true,"x":0,"y":26},{"widget":{"header":"default-header","body":"line-chart-view","title":"SERVICE - Open Connections"},"w":24,"h":9,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":"cloudmoa","namespace":"","metricId":"traefik_service_open_connections","entityId":"","type":"Traefik","filter":""}},"visualization":{"showLegend":true}},"i":"widget9","static":true,"x":24,"y":26},{"widget":{"header":"default-header","body":"stack-bar-chart-view","title":"Used Sockets"},"w":24,"h":11,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":"cloudmoa","namespace":"","metricId":"traefik_soket_used","entityId":"","type":"Traefik","filter":""}},"visualization":{"showLegend":true}},"i":"widget10","static":true,"x":0,"y":35},{"widget":{"header":"default-header","body":"stack-bar-chart-view","title":"Access to services / sec"},"w":24,"h":10,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":"cloudmoa","namespace":"","metricId":"traefik_http_requests_rate_by_service","entityId":"","type":"Traefik","filter":""}},"visualization":{"showLegend":true}},"i":"widget11","static":true,"x":0,"y":16},{"widget":{"header":"default-header","body":"stack-bar-chart-view","title":"Access to Entrypoints / sec"},"w":24,"h":10,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":"cloudmoa","namespace":"","metricId":"traefik_http_requests_rate_by_entrypoint","entityId":"","type":"Traefik","filter":""}},"visualization":{"showLegend":true}},"i":"widget12","static":true,"x":24,"y":16},{"widget":{"header":"default-header","body":"horizontal-bar-chart-view","title":"Horizontal Bar Chart"},"w":24,"h":11,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":false,"clusterId":"cloudmoa","namespace":"","metricId":"traefik_status_code_count","entityId":"","type":"Traefik","filter":""}},"visualization":{"showLegend":true}},"i":"widget13","static":true,"x":24,"y":35}]', + 'Traefik', (select id from auth_resource3 where name='dashboard|admin|Traefik'), 'admin', 'admin', NULL, true); +INSERT INTO public.dashboard2 (id, created_date, modified_date, layout, title, auth_resource_id, created_by, modified_by, description, "share") + VALUES(nextval('hibernate_sequence'), '2020-04-28 09:23:14.286', '2020-04-28 09:23:44.213', '[{"i":"widget0","widget":{"header":"default-header","body":"stat-view","title":"Current QPS"},"w":8,"h":8,"minW":6,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":true,"range":false,"clusterId":"cloudmoa","namespace":"","metricId":"mysql_query_per_second","entityId":"","type":"MySQL","filter":""}},"visualization":{"showGauge":false,"showPercent":false,"min":null,"max":null,"decimals":2,"baseColor":"#409EFF","thresholds":[],"showLegend":true}},"x":16,"y":0,"static":true},{"i":"widget1","widget":{"header":"default-header","body":"stat-view","title":"InnoDB Buffer Pool Size (GiB)"},"w":8,"h":8,"minW":6,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":true,"range":false,"clusterId":"cloudmoa","namespace":"","metricId":"mysql_Innodb_buffer_pool_size","entityId":"","type":"MySQL","filter":""}},"visualization":{"showGauge":false,"showPercent":false,"min":null,"max":null,"decimals":2,"baseColor":"#409EFF","thresholds":[],"showLegend":true}},"x":8,"y":0,"static":true},{"i":"widget2","widget":{"header":"default-header","body":"stat-view","title":"Number of Connection Attempts"},"w":8,"h":8,"minW":6,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":true,"range":false,"clusterId":"cloudmoa","namespace":"","metricId":"mysql_global_status_connections","entityId":"","type":"MySQL","filter":""}},"visualization":{"showGauge":false,"showPercent":false,"min":null,"max":null,"decimals":2,"baseColor":"#409EFF","thresholds":[]}},"x":40,"y":0,"static":true},{"i":"widget3","widget":{"header":"default-header","body":"stat-view","title":"Max Connection","description":"Maximum permitted number of simultaneous client connections. By default, this is 151."},"w":8,"h":8,"minW":6,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":true,"range":false,"clusterId":"cloudmoa","namespace":"","metricId":"mysql_global_variables_max_connections","entityId":"","type":"MySQL","filter":""}},"visualization":{"showGauge":false,"showPercent":false,"min":null,"max":null,"decimals":2,"baseColor":"#409EFF","thresholds":[]}},"x":24,"y":0,"static":true},{"i":"widget4","widget":{"header":"default-header","body":"stat-view","title":"Number of Max Used Connection","description":"Maximum number of connections that have been in use simultaneously since the server started."},"w":8,"h":8,"minW":6,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":true,"range":false,"clusterId":"cloudmoa","namespace":"","metricId":"mysql_global_status_max_used_connections","entityId":"","type":"MySQL","filter":""}},"visualization":{"showGauge":false,"showPercent":false,"min":null,"max":null,"decimals":2,"baseColor":"#409EFF","thresholds":[]}},"x":32,"y":0,"static":true},{"i":"widget5","widget":{"header":"default-header","body":"stat-view","title":"Instance Up Count"},"w":8,"h":8,"minW":6,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":true,"range":false,"clusterId":"cloudmoa","namespace":"","metricId":"mysql_up","entityId":"","type":"MySQL","filter":""}},"visualization":{"showGauge":false,"showPercent":false,"min":null,"max":null,"decimals":2,"baseColor":"#409EFF","thresholds":[],"showLegend":true}},"x":0,"y":0,"static":true},{"i":"widget6","widget":{"header":"default-header","body":"line-chart-view","title":"Buffer Cache Hit Ratio"},"w":24,"h":11,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":"cloudmoa","namespace":"","metricId":"mysql_cache_hit_ratio","entityId":"","type":"MySQL","filter":""}},"visualization":{"showLegend":true}},"x":24,"y":19,"static":true},{"i":"widget7","widget":{"header":"default-header","body":"line-chart-view","title":"Disk R/W Bytes"},"w":24,"h":11,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":"cloudmoa","namespace":"","metricId":"mysql_disk_io","entityId":"","type":"MySQL","filter":""}},"visualization":{"showLegend":true}},"x":24,"y":8,"static":true},{"i":"widget8","widget":{"header":"default-header","body":"line-chart-view","title":"Buffer I/O Bytes"},"w":24,"h":11,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":"cloudmoa","namespace":"","metricId":"mysql_buffer_io","entityId":"","type":"MySQL","filter":""}},"visualization":{"showLegend":true}},"x":0,"y":19,"static":true},{"i":"widget9","widget":{"header":"default-header","body":"line-chart-view","title":"Network Recieved / Transmit (KiB)"},"w":24,"h":11,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":"cloudmoa","namespace":"","metricId":"mysql_bytes_received_sent","entityId":"","type":"MySQL","filter":""}},"visualization":{"showLegend":true}},"x":0,"y":8,"static":true},{"i":"widget10","widget":{"header":"default-header","body":"stack-bar-chart-view","title":"Number of Locks"},"w":24,"h":11,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":"cloudmoa","namespace":"","metricId":"mysql_status_locks","entityId":"","type":"MySQL","filter":""}},"visualization":{"showLegend":true}},"x":0,"y":30,"static":true},{"i":"widget11","widget":{"header":"default-header","body":"line-chart-view","title":"MySQL Questions"},"w":24,"h":11,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":"cloudmoa","namespace":"","metricId":"mysql_global_status_questions","entityId":"","type":"MySQL","filter":""}},"visualization":{"showLegend":true}},"x":24,"y":30,"static":true},{"i":"widget12","widget":{"header":"default-header","body":"line-chart-view","title":"Line Chart"},"w":24,"h":11,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":"cloudmoa","namespace":"","metricId":"mysql_threads_total","entityId":"","type":"MySQL","filter":""}},"visualization":{"showLegend":true}},"x":0,"y":41,"static":true},{"widget":{"header":"default-header","body":"horizontal-bar-chart-view","title":"Command Executed"},"w":24,"h":11,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":false,"clusterId":"cloudmoa","namespace":"","metricId":"mysql_global_status_commands_total","entityId":"","type":"MySQL","filter":""}},"visualization":{"showLegend":true}},"i":"widget13","static":true,"x":24,"y":41}]', + 'MySQL / MariaDB', (select id from auth_resource3 where name='dashboard|admin|MySQL / MariaDB'), 'admin', 'admin', NULL, true); +INSERT INTO public.dashboard2 (id, created_date, modified_date, layout, title, auth_resource_id, created_by, modified_by, description, "share") + VALUES(nextval('hibernate_sequence'), '2020-04-28 09:23:14.286', '2020-04-28 09:23:44.213', '[{"i":"widget0","widget":{"header":"default-header","body":"stat-view","title":"Up"},"w":9,"h":9,"minW":6,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":true,"range":false,"clusterId":"cloudmoa","namespace":"","metricId":"nginx_ingress_nginx_up","entityId":"","type":"Nginx-Ingress","filter":""}},"visualization":{"showGauge":false,"showPercent":false,"min":null,"max":null,"decimals":2,"baseColor":"#409EFF","thresholds":[]}},"x":0,"y":0,"static":true},{"i":"widget1","widget":{"header":"default-header","body":"line-chart-view","title":"CPU Usage (%)"},"w":12,"h":9,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":"cloudmoa","namespace":"nginx-ingress","metricId":"container_cpu_usage_core_by_workload","entityId":"deploymentList,nginx-ingress-nginx-ingress","type":"workload"}},"visualization":{"showLegend":true}},"x":0,"y":9,"static":true},{"i":"widget2","widget":{"header":"default-header","body":"line-chart-view","title":"Memory Usage (GiB)"},"w":12,"h":9,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":"cloudmoa","namespace":"nginx-ingress","metricId":"container_memory_usage_by_workload","entityId":"deploymentList,nginx-ingress-nginx-ingress","type":"workload"}},"visualization":{"showLegend":true}},"x":12,"y":9,"static":true},{"i":"widget3","widget":{"header":"default-header","body":"stat-view","title":"Connected Clients Count"},"w":10,"h":9,"minW":6,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":true,"range":false,"clusterId":"cloudmoa","namespace":"","metricId":"nginx_ingress_nginx_connections_active","entityId":"","type":"Nginx-Ingress","filter":""}},"visualization":{"showGauge":false,"showPercent":false,"min":null,"max":null,"decimals":null,"baseColor":"#409EFF","thresholds":[],"showLegend":true}},"x":9,"y":0,"static":true},{"i":"widget4","widget":{"header":"default-header","body":"line-chart-view","title":"Network Transmit (KB)"},"w":12,"h":9,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":"cloudmoa","namespace":"nginx-ingress","metricId":"container_network_transmit_by_workload","entityId":"deploymentList,nginx-ingress-nginx-ingress","type":"workload"}},"visualization":{"showLegend":true}},"x":24,"y":9,"static":true},{"i":"widget5","widget":{"header":"default-header","body":"line-chart-view","title":"Network Recieved (KiB)"},"w":12,"h":9,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":"cloudmoa","namespace":"nginx-ingress","metricId":"container_network_receive_by_workload","entityId":"deploymentList,nginx-ingress-nginx-ingress","type":"workload"}},"visualization":{"showLegend":true}},"x":36,"y":9,"static":true},{"i":"widget6","widget":{"header":"default-header","body":"stat-view","title":"Nginx Ingress last reload status"},"w":10,"h":9,"minW":6,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":true,"range":false,"clusterId":"cloudmoa","namespace":"","metricId":"nginx_ingress_controller_nginx_last_reload_status","entityId":"","type":"Nginx-Ingress","filter":""}},"visualization":{"showGauge":false,"showPercent":false,"min":null,"max":null,"decimals":2,"baseColor":"#409EFF","thresholds":[],"showLegend":true}},"x":19,"y":0,"static":true},{"i":"widget7","widget":{"header":"default-header","body":"stat-view","title":"Nginx Ingress reload success total"},"w":10,"h":9,"minW":6,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":true,"range":false,"clusterId":"cloudmoa","namespace":"","metricId":"nginx_ingress_controller_nginx_reloads_total","entityId":"","type":"Nginx-Ingress","filter":""}},"visualization":{"showGauge":false,"showPercent":false,"min":null,"max":null,"decimals":2,"baseColor":"#409EFF","thresholds":[]}},"x":29,"y":0,"static":true},{"i":"widget8","widget":{"header":"default-header","body":"stat-view","title":"Nginx Ingress reload error total"},"w":9,"h":9,"minW":6,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":true,"range":false,"clusterId":"cloudmoa","namespace":"","metricId":"nginx_ingress_controller_nginx_reload_errors_total","entityId":"","type":"Nginx-Ingress","filter":""}},"visualization":{"showGauge":false,"showPercent":false,"min":null,"max":null,"decimals":2,"baseColor":"#409EFF","thresholds":[]}},"x":39,"y":0,"static":true},{"i":"widget10","widget":{"header":"default-header","body":"line-chart-view","title":"Nginx Ingress Http Request Seconds"},"w":48,"h":15,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":"cloudmoa","namespace":"","metricId":"nginx_ingress_nginx_http_requests_second","entityId":"","type":"Nginx-Ingress","filter":""}},"visualization":{"showLegend":true}},"x":0,"y":18,"static":true}]', + 'Nginx-Ingress', (select id from auth_resource3 where name='dashboard|admin|Nginx-Ingress'), 'admin', 'admin', NULL, true); + + + +-- 리포트 메일 발송 관련 테이블 추가 +CREATE TABLE public.report_group ( + id bigint NOT NULL, + created_by character varying(255), + created_date timestamp without time zone, + modified_by character varying(255), + modified_date timestamp without time zone, + users text, + name character varying(255) +); +ALTER TABLE public.report_group OWNER TO admin; + +ALTER TABLE ONLY public.report_group ADD CONSTRAINT report_group_pkey PRIMARY KEY (id); + +CREATE TABLE public.report_group_registry ( + id bigint NOT NULL, + report_template_id bigint NOT NULL, + report_group_id bigint NOT NULL +); + +ALTER TABLE public.report_group_registry OWNER TO admin; + +ALTER TABLE ONLY public.report_group_registry ADD CONSTRAINT report_group_registry_pkey PRIMARY KEY (id); +ALTER TABLE ONLY public.report_group_registry ADD CONSTRAINT report_group_registry_template_id_fk FOREIGN KEY (report_template_id) REFERENCES public.report_template(id); +ALTER TABLE ONLY public.report_group_registry ADD CONSTRAINT report_group_registry_group_id_fk FOREIGN KEY (report_group_id) REFERENCES public.report_group(id); + +-- CLOUD-13633; 대시보드 관련 패치 +-- Traefik 대시보드 지원 관련 metric meta 추가 +-- Auto-generated SQL script #202303161740 +INSERT INTO public.metric_meta2 (id,meta_name,description,expr,resource_type,entity_type,groupby_keys,in_use,message) + VALUES ('traefik_uptime','Traefik Uptime','Traefik Process Uptime','time() - process_start_time_seconds{job="cmoa-traefik"}','Instance','Traefik','xm_clst_id, xm_namespace, xm_pod_id',true,'None'); +INSERT INTO public.metric_meta2 (id,meta_name,description,expr,resource_type,entity_type,groupby_keys,in_use,message) + VALUES ('traefik_soket_used','Traefik Socket Used','Number of sockets Traefik is using','process_open_fds{job=~"cmoa-traefik"}','Instance','Traefik','xm_clst_id, xm_namespace, xm_pod_id',true,'None'); +INSERT INTO public.metric_meta2 (id,meta_name,description,expr,resource_type,entity_type,in_use,message) + VALUES ('traefik_http_requests_rate_last_5m','Traefik HTTP Requests Rate','Number of http requests per second received by Traefik within 5 minutes','sum(rate(traefik_service_requests_total[5m]))','Request','Traefik',true,'CLST:{{$labels.xm_clst_id}} NS:{{$labels.xm_namespace}} POD:{{$labels.xm_pod_id}} Trafik HTTP Request Rate :{{humanize $value}}|{threshold}.'); +INSERT INTO public.metric_meta2 (id,meta_name,description,expr,resource_type,entity_type,in_use,message) + VALUES ('traefik_http_requests_rate_by_service','Traefik HTTP Requets Rate by Service','Number of http requests per second grouped by service within 5 minutes','sum(rate(traefik_service_requests_total[5m])) by (service)','Request','Traefik',true,'CLST:{{$labels.xm_clst_id}} NS:{{$labels.xm_namespace}} POD:{{$labels.xm_pod_id}} Trafik HTTP Request Rate :{{humanize $value}}|{threshold}.'); +INSERT INTO public.metric_meta2 (id,meta_name,description,expr,resource_type,entity_type,in_use,message) + VALUES ('traefik_http_requests_rate_by_entrypoint','Traefik HTTP Requets Rate by Entrypoint','Number of http requests per second grouped by entrypoint within 5 minutes','sum(rate(traefik_entrypoint_requests_total[5m])) by (entrypoint)','Request','Traefik',true,'None'); +INSERT INTO public.metric_meta2 (id,meta_name,description,expr,resource_type,entity_type,groupby_keys,in_use,message) + VALUES ('traefik_4xx_error_rate_last_5m','Traefik 4xx Error Rate','4xx error requests per second rate within 5 minutes','sum(rate(traefik_service_requests_total{code=~"4[0-9]{2}"}[5m]))','Request','Traefik','xm_clst_id, xm_namespace, xm_pod_id',true,'CLST:{{$labels.xm_clst_id}} NS:{{$labels.xm_namespace}} POD:{{$labels.xm_pod_id}} Trafik 4xx Error Rate :{{humanize $value}}|{threshold}.'); +INSERT INTO public.metric_meta2 (id,meta_name,description,expr,resource_type,entity_type,groupby_keys,in_use,message) + VALUES ('traefik_5xx_error_rate_last_5m','Traefik 5xx Error Rate','5xx error requests per second rate within 5 minutes','sum(rate(traefik_service_requests_total{code=~"5[0-9]{2}"}[5m]))','Request','Traefik','xm_clst_id, xm_namespace, xm_pod_id',true,'CLST:{{$labels.xm_clst_id}} NS:{{$labels.xm_namespace}} POD:{{$labels.xm_pod_id}} Trafik 5xx Error Rate :{{humanize $value}}|{threshold}.'); +INSERT INTO public.metric_meta2 (id,meta_name,description,expr,resource_type,entity_type,groupby_keys,in_use,message) + VALUES ('traefik_http_requests_4xx_total_last_10m','Traefik HTTP Requests 4xx Total Last 10m','Number of 4xx error requests in 10 minutes','sum(increase(traefik_service_requests_total{code=~"4[0-9]{2}"}[10m]))','Request','Traefik','xm_clst_id, xm_namespace, xm_pod_id',true,'None'); +INSERT INTO public.metric_meta2 (id,meta_name,description,expr,resource_type,entity_type,groupby_keys,in_use,message) + VALUES ('traefik_http_requests_5xx_total_last_10m','Traefik HTTP Requests 5xx Total Last 10m','Number of 5xx error requests in 10 minutes','sum(increase(traefik_service_requests_total{code=~"5[0-9]{2}"}[10m]))','Request','Traefik','xm_clst_id, xm_namespace, xm_pod_id',true,'None'); +INSERT INTO public.metric_meta2 (id,meta_name,description,expr,resource_type,entity_type,groupby_keys,in_use,message) + VALUES ('traefik_http_requests_4xx_total_last_1h','Traefik HTTP Requests 4xx Total Last 1h','Number of 4xx error requests in 1 hour','sum(increase(traefik_service_requests_total{code=~"4[0-9]{2}"}[1h]))','Request','Traefik','xm_clst_id, xm_namespace, xm_pod_id',true,'None'); +INSERT INTO public.metric_meta2 (id,meta_name,description,expr,resource_type,entity_type,groupby_keys,in_use,message) + VALUES ('traefik_http_requests_5xx_total_last_1h','Traefik HTTP Requests 4xx Total Last 1h','Number of 5xx error requests in 1 hour','sum(increase(traefik_service_requests_total{code=~"5[0-9]{2}"}[1h]))','Request','Traefik','xm_clst_id, xm_namespace, xm_pod_id',true,'None'); +INSERT INTO public.metric_meta2 (id,meta_name,description,expr,resource_type,entity_type,in_use,message) + VALUES ('traefik_http_response_time_ms','Traefik HTTP Response Time Milisecond','Traefik HTTP Response Time (ms)','sum(increase(traefik_service_request_duration_seconds_sum[5m])) / sum(increase(traefik_entrypoint_requests_total[5m])) * 1000','Response','Traefik',true,'None'); +INSERT INTO public.metric_meta2 (id,meta_name,description,expr,resource_type,entity_type,in_use,message) + VALUES ('traefik_entrypoint_open_connections','Traefik Entrypoint Open Connections','The current count of open connections on an entrypoint','sum(traefik_entrypoint_open_connections) by (method)','Entrypoint','Traefik',true,'None'); +INSERT INTO public.metric_meta2 (id,meta_name,description,expr,resource_type,entity_type,in_use,message) + VALUES ('traefik_service_open_connections','Traefik Service Open Connections','The current count of open connections on an service','sum(traefik_service_open_connections) by (method)','Service','Traefik',true,'None'); +INSERT INTO public.metric_meta2 (id,meta_name,description,expr,resource_type,entity_type,groupby_keys,in_use,message) + VALUES ('traefik_http_requests_total_last_10m','Traefik HTTP Requests Total Last 10m','Number requests in 10 minutes','sum(increase(traefik_service_requests_total{}[10m]))','Request','Traefik','xm_clst_id, xm_namespace, xm_pod_id',true,'CLST:{{$labels.xm_clst_id}} NS:{{$labels.xm_namespace}} POD:{{$labels.xm_pod_id}} Trafik Request Count (10m) :{{humanize $value}}|{threshold}.'); +INSERT INTO public.metric_meta2 (id,meta_name,description,expr,resource_type,entity_type,groupby_keys,in_use,message) + VALUES ('traefik_http_requests_total_last_1h','Traefik HTTP Requests Total Last 1h','Number requests in 1 hour','sum(increase(traefik_service_requests_total{}[1h]))','Request','Traefik','xm_clst_id, xm_namespace, xm_pod_id',true,'CLST:{{$labels.xm_clst_id}} NS:{{$labels.xm_namespace}} POD:{{$labels.xm_pod_id}} Trafik Request Count (1h) :{{humanize $value}}|{threshold}.'); + +-- MySQL-MariaDB 대시보드 지원 관련 metric meta 추가 +-- Auto-generated SQL script #202303201205 +INSERT INTO public.metric_meta2 (id,meta_name,description,expr,resource_type,entity_type,groupby_keys,in_use,anomaly_score,message) + VALUES ('mysql_query_per_second','Query Per Second','Based on the queries reported by MySQL''s SHOW STATUS command, it is the number of statements executed by the server within the last second.','irate(mysql_global_status_queries{}[5m])','Query','MySQL','instance',true,true,'CLST:{{$labels.xm_clst_id}} NS:{{$labels.xm_namespace}} MySQL QPS :{{humanize $value}}%|{threshold}%.'); +INSERT INTO public.metric_meta2 (id,meta_name,description,expr,resource_type,entity_type,groupby_keys,in_use,message) + VALUES ('mysql_Innodb_buffer_pool_size','InnoDB Buffer Pool Size in GiB','Describes a storage area called the buffer pool for caching data and indexes in memory.','mysql_global_variables_innodb_buffer_pool_size / 1024 / 1024 / 1024','InnoDB','MySQL','instance',true,'None'); +INSERT INTO public.metric_meta2 (id,meta_name,description,expr,resource_type,entity_type,groupby_keys,in_use,message) + VALUES ('mysql_Innodb_buffer_pool_size_gib_with_limit','InnoDB Buffer Pool Size with Limit','Describes a storage area called the buffer pool for caching data and indexes in memory.','(mysql_global_variables_innodb_buffer_pool_size{} * 100) / on (xm_pod_id,xm_cont_name) imxc_kubernetes_container_resource_limit_memory{xm_pod_id!~"|POD", pod_state="Running"}','InnoDB','MySQL','instance',true,'None'); +INSERT INTO public.metric_meta2 (id,meta_name,description,expr,resource_type,entity_type,groupby_keys,in_use,message) + VALUES ('mysql_global_status_questions','MySQL Questions','The number of statements executed by the server.','rate(mysql_global_status_questions{}[5m])','Query','MySQL','instance',true,'None'); +INSERT INTO public.metric_meta2 (id,meta_name,description,expr,resource_type,entity_type,groupby_keys,in_use,message) + VALUES ('mysql_global_status_max_used_connections','Max Used Connections','Maximum number of connections that have been in use simultaneously since the server started.','mysql_global_status_max_used_connections','Connection','MySQL','instance',true,'None'); +INSERT INTO public.metric_meta2 (id,meta_name,description,expr,resource_type,entity_type,groupby_keys,in_use,message) + VALUES ('mysql_global_variables_max_connections','Max Connections','Maximum permitted number of simultaneous client connections. By default, this is 151.','mysql_global_variables_max_connections','Connection','MySQL','instance',true,'None'); + +-- Auto-generated SQL script #202303201412 +UPDATE public.metric_meta2 + SET expr='max(max_over_time(mysql_global_status_threads_connected[5m]) or mysql_global_status_threads_connected )' + WHERE id='mysql_global_status_connections'; +UPDATE public.metric_meta2 + SET groupby_keys='instance' + WHERE id='mysql_global_status_connections'; +-- Auto-generated SQL script #202303210950 +DELETE FROM public.metric_meta2 + WHERE id='mysql_global_status_cache_hit_ratio'; + +-- Auto-generated SQL script #202303210950 +UPDATE public.metric_meta2 +SET expr = e'sum by (data_type, xm_clst_id, xm_namespace, xm_node_id, instance) ( +label_replace(irate(mysql_global_status_innodb_buffer_pool_write_requests[5m]), "data_type", "write", "", "") or +label_replace(irate(mysql_global_status_innodb_buffer_pool_read_requests[5m]), "data_type", "read", "", "") )' +WHERE id LIKE 'mysql#_buffer#_io' ESCAPE '#'; + +-- Auto-generated SQL script #202303210950 +UPDATE public.metric_meta2 +SET expr = e'sum by (data_type, xm_clst_id, xm_namespace, xm_node_id, instance) ( + label_replace(rate(mysql_global_status_bytes_received [1m])/1024, "data_type", "received", "", "") or + label_replace(rate(mysql_global_status_bytes_sent [1m])/1024, "data_type", "sent", "", ""))' +WHERE id LIKE 'mysql#_bytes#_received#_sent' ESCAPE '#'; + +-- Nginx Ingress 대시보드 지원 관련 metric meta 추가 +INSERT INTO public.metric_meta2 (id,meta_name,description,expr,resource_type,entity_type,groupby_keys,in_use,message) VALUES('nginx_ingress_nginx_up','Nginx Ingress Up','Nginx Ingress Up','sum by (xm_clst_id, xm_namespace, xm_node_id, instance, class) (nginx_ingress_nginx_up)','Pod','Nginx-Ingress','',true,false,'None'); +INSERT INTO public.metric_meta2 (id,meta_name,description,expr,resource_type,entity_type,groupby_keys,in_use,message) VALUES('nginx_ingress_nginx_connections_active','Nginx Ingress Connection Active','Nginx Ingress Client Connection Active','sum by (xm_clst_id, xm_namespace, xm_node_id, instance, class) (nginx_ingress_nginx_connections_active)','Connection','Nginx-Ingress','',true,false,'None'); +INSERT INTO public.metric_meta2 (id,meta_name,description,expr,resource_type,entity_type,groupby_keys,in_use,message) VALUES('nginx_ingress_controller_nginx_last_reload_status','Nginx Ingress last reload status','Status of the last NGINX reload','sum by (xm_clst_id, xm_namespace, xm_node_id, instance, class) (nginx_ingress_controller_nginx_reload_errors_total)','Config','Nginx-Ingress','',true,false,'None'); +INSERT INTO public.metric_meta2 (id,meta_name,description,expr,resource_type,entity_type,groupby_keys,in_use,message) VALUES('nginx_ingress_controller_nginx_reload_errors_total','Nginx Ingress reload error total','Number of unsuccessful NGINX reloads','sum by (xm_clst_id, xm_namespace, xm_node_id, instance, class) (nginx_ingress_controller_nginx_reload_errors_total)','Config','Nginx-Ingress','',true,false,'None'); +INSERT INTO public.metric_meta2 (id,meta_name,description,expr,resource_type,entity_type,groupby_keys,in_use,message) VALUES('nginx_ingress_controller_nginx_reloads_total','Nginx Ingress reload success total','Number of successful NGINX reloads','sum by (xm_clst_id, xm_namespace, xm_node_id, instance, class) (nginx_ingress_controller_nginx_reloads_total)','Config','Nginx-Ingress','',true,false,'None'); +INSERT INTO public.metric_meta2 (id,meta_name,description,expr,resource_type,entity_type,groupby_keys,in_use,message) VALUES('nginx_ingress_nginx_http_requests_total','Nginx Ingress Http Request Total','Total http requests','sum by (xm_clst_id, xm_namespace, xm_node_id, instance, class) (nginx_ingress_nginx_http_requests_total)','Request','Nginx-Ingress','',true,false,'None'); +INSERT INTO public.metric_meta2 (id,meta_name,description,expr,resource_type,entity_type,groupby_keys,in_use,message) VALUES('nginx_ingress_nginx_http_requests_second','Nginx Ingress Http Request Seconds','Http request per second','sum by (xm_clst_id, xm_namespace, xm_node_id, instance, class) (rate(nginx_ingress_nginx_http_requests_total[1m]))','Request','Nginx-Ingress','',true,false,'None'); diff --git a/roles/cmoa_install/files/03-ddl-dml/postgres/pg.sh b/roles/cmoa_install/files/03-ddl-dml/postgres/pg.sh old mode 100644 new mode 100755 diff --git a/roles/cmoa_install/files/03-ddl-dml/postgres/postgres_check_data b/roles/cmoa_install/files/03-ddl-dml/postgres/postgres_check_data old mode 100644 new mode 100755 diff --git a/roles/cmoa_install/files/03-ddl-dml/postgres/postgres_insert_ddl.psql b/roles/cmoa_install/files/03-ddl-dml/postgres/postgres_insert_ddl.psql index c8deff4..6ec2501 100644 --- a/roles/cmoa_install/files/03-ddl-dml/postgres/postgres_insert_ddl.psql +++ b/roles/cmoa_install/files/03-ddl-dml/postgres/postgres_insert_ddl.psql @@ -47,7 +47,18 @@ ALTER TABLE ONLY public.alert_target ALTER TABLE ONLY public.alert_target ADD CONSTRAINT fkjrvj775641ky7s0f82kx3sile FOREIGN KEY (alert_group_id) REFERENCES public.alert_group(id); +CREATE TABLE public.report_group ( + id bigint NOT NULL, + created_by character varying(255), + created_date timestamp without time zone, + modified_by character varying(255), + modified_date timestamp without time zone, + users text, + name character varying(255) +); +ALTER TABLE public.report_group OWNER TO admin; +ALTER TABLE ONLY public.report_group ADD CONSTRAINT report_group_pkey PRIMARY KEY (id); CREATE TABLE public.report_template ( id bigint NOT NULL, @@ -59,7 +70,8 @@ CREATE TABLE public.report_template ( enable boolean NOT NULL, metric_data text, template_data text, - title character varying(255) + title character varying(255), + report_group_id int8 NULL ); ALTER TABLE public.report_template OWNER TO admin; @@ -67,6 +79,19 @@ ALTER TABLE public.report_template OWNER TO admin; ALTER TABLE ONLY public.report_template ADD CONSTRAINT report_template_pkey PRIMARY KEY (id); + +CREATE TABLE public.report_group_registry ( + id bigint NOT NULL, + report_template_id bigint NOT NULL, + report_group_id bigint NOT NULL +); + +ALTER TABLE public.report_group_registry OWNER TO admin; + +ALTER TABLE ONLY public.report_group_registry ADD CONSTRAINT report_group_registry_pkey PRIMARY KEY (id); +ALTER TABLE ONLY public.report_group_registry ADD CONSTRAINT report_group_registry_template_id_fk FOREIGN KEY (report_template_id) REFERENCES public.report_template(id); +ALTER TABLE ONLY public.report_group_registry ADD CONSTRAINT report_group_registry_group_id_fk FOREIGN KEY (report_group_id) REFERENCES public.report_group(id); + CREATE TABLE public.alert_event ( id bigint NOT NULL, created_date timestamp without time zone NOT NULL, diff --git a/roles/cmoa_install/files/03-ddl-dml/postgres/postgres_insert_dml.psql b/roles/cmoa_install/files/03-ddl-dml/postgres/postgres_insert_dml.psql index c9e213d..a5a30da 100644 --- a/roles/cmoa_install/files/03-ddl-dml/postgres/postgres_insert_dml.psql +++ b/roles/cmoa_install/files/03-ddl-dml/postgres/postgres_insert_dml.psql @@ -62,8 +62,8 @@ INSERT INTO public.auth_resource2 (access_type, name, parent_id, type) VALUES (4 INSERT INTO public.auth_resource2 (access_type, name, parent_id, type) VALUES (4, 'Agent', (select id from auth_resource2 where type='menu' and name='Settings'), 'menu'); INSERT INTO public.auth_resource2 (access_type, name, parent_id, type) VALUES (4, 'Alias', (select id from auth_resource2 where type='menu' and name='Settings'), 'menu'); -INSERT INTO public.auth_resource2 (access_type, name, parent_id, type) VALUES (4, 'Documents', (select id from auth_resource2 where type='menu' and name='Dashboards'), 'menu'); -INSERT INTO public.auth_resource2 (access_type, name, parent_id, type) VALUES (4, 'Templates', (select id from auth_resource2 where type='menu' and name='Dashboards'), 'menu'); +INSERT INTO public.auth_resource2 (access_type, name, parent_id, type) VALUES (4, 'My List', (select id from auth_resource2 where type='menu' and name='Dashboards'), 'menu'); +INSERT INTO public.auth_resource2 (access_type, name, parent_id, type) VALUES (4, 'Shared List', (select id from auth_resource2 where type='menu' and name='Dashboards'), 'menu'); INSERT INTO public.auth_resource2 (access_type, name, parent_id, type) VALUES (4, 'Topology', (select id from auth_resource2 where type='menu' and name='Hosts'), 'menu'); INSERT INTO public.auth_resource2 (access_type, name, parent_id, type) VALUES (4, 'Overview', (select id from auth_resource2 where type='menu' and name='Hosts'), 'menu'); @@ -71,9 +71,9 @@ INSERT INTO public.auth_resource2 (access_type, name, parent_id, type) VALUES (4 INSERT INTO public.auth_resource2 (access_type, name, parent_id, type) VALUES (4, 'Detail', (select id from auth_resource2 where type='menu' and name='Hosts'), 'menu'); INSERT INTO public.auth_resource2 (access_type, name, parent_id, type) VALUES (4, 'Group', (select id from auth_resource2 where type='menu' and name='Hosts'), 'menu'); -INSERT INTO public.auth_resource2 (access_type, name, parent_id, type) VALUES (4, 'CloudMOA - Nodes Resource', NULL, 'dashboard'); -INSERT INTO public.auth_resource2 (access_type, name, parent_id, type) VALUES (4, 'Service Detail', NULL, 'dashboard'); - +--INSERT INTO public.auth_resource2 (access_type, name, parent_id, type) VALUES (4, 'CloudMOA - Nodes Resource', NULL, 'dashboard'); +--INSERT INTO public.auth_resource2 (access_type, name, parent_id, type) VALUES (4, 'Service Detail', NULL, 'dashboard'); +--INSERT INTO public.auth_resource2 (access_type, name, parent_id, type) VALUES (4, 'Postgres', NULL, 'dashboard'); --INSERT INTO public.auth_resource2 (access_type, name, parent_id, type) VALUES(4, 'Check Script', (select id from auth_resource2 where type='menu' and name='Health Check'), 'menu'); INSERT INTO public.auth_resource3 (name, is_deleted, tenant_id) VALUES ('menu|Infrastructure', false, null); @@ -139,8 +139,8 @@ INSERT INTO public.auth_resource3 (name, is_deleted, tenant_id) VALUES ('menu|Se INSERT INTO public.auth_resource3 (name, is_deleted, tenant_id) VALUES ('menu|Settings|Sparse Logs|Node', false, null); INSERT INTO public.auth_resource3 (name, is_deleted, tenant_id) VALUES ('menu|Settings|Sparse Logs|Container', false, null); -INSERT INTO public.auth_resource3 (name, is_deleted, tenant_id) VALUES ('menu|Dashboards|Documents', false, null); -INSERT INTO public.auth_resource3 (name, is_deleted, tenant_id) VALUES ('menu|Dashboards|Templates', false, null); +INSERT INTO public.auth_resource3 (name, is_deleted, tenant_id) VALUES ('menu|Dashboards|My List', false, null); +INSERT INTO public.auth_resource3 (name, is_deleted, tenant_id) VALUES ('menu|Dashboards|Shared List', false, null); INSERT INTO public.auth_resource3 (name, is_deleted, tenant_id) VALUES ('menu|Hosts|Topology', false, null); INSERT INTO public.auth_resource3 (name, is_deleted, tenant_id) VALUES ('menu|Hosts|Overview', false, null); @@ -168,8 +168,15 @@ VALUES('admin', null, null, null, null, false, false, true, true, now(), null); --(user_id, lang, theme, access_token, refresh_token, error_msg, alert_sound, session_persistence, gpu_acc_topology, created_date, modified_date) --VALUES('owner', null, null, null, null, false, false, true, true, now(), null); -INSERT INTO public.auth_resource3 (name, is_deleted, tenant_id) VALUES ('dashboard|admin|CloudMOA - Nodes Resource', false, null); +-- Dashboard 추가 (Nodes Resource , Service Detail , Postgres , Redis , Traefik , MySQL / MariaDB , Nginx-Ingress) +INSERT INTO public.auth_resource3 (name, is_deleted, tenant_id) VALUES ('dashboard|admin|Nodes Resource', false, null); INSERT INTO public.auth_resource3 (name, is_deleted, tenant_id) VALUES ('dashboard|admin|Service Detail', false, null); +INSERT INTO public.auth_resource3 (name, is_deleted, tenant_id) VALUES ('dashboard|admin|Postgres', false, null); +INSERT INTO public.auth_resource3 (name, is_deleted, tenant_id) VALUES ('dashboard|admin|Redis', false, null); +INSERT INTO public.auth_resource3 (name, is_deleted, tenant_id) VALUES ('dashboard|admin|Traefik', false, null); +INSERT INTO public.auth_resource3 (name, is_deleted, tenant_id) VALUES ('dashboard|admin|MySQL / MariaDB', false, null); +INSERT INTO public.auth_resource3 (name, is_deleted, tenant_id) VALUES ('dashboard|admin|Nginx-Ingress', false, null); + INSERT INTO public.auth_resource3 (name, is_deleted, tenant_id) VALUES ('cluster|cloudmoa', false, 'DEFAULT_TENANT'); @@ -218,8 +225,8 @@ INSERT INTO public.menu_meta (id, description, icon, "position", url, auth_resou INSERT INTO public.menu_meta (id, description, icon, "position", url, auth_resource3_id, scope_level) VALUES (62, 'Templates', NULL, 1, 'templateReport', (select id from auth_resource3 where name='menu|Reports|Templates'), 2); INSERT INTO public.menu_meta (id, description, icon, "position", url, auth_resource3_id, scope_level) VALUES (65, 'Dashboards', '10.Dashboard', 7, NULL, (select id from auth_resource3 where name='menu|Dashboards'), 2); -INSERT INTO public.menu_meta (id, description, icon, "position", url, auth_resource3_id, scope_level) VALUES (66, 'Documents', NULL, 0, 'documentDashboard', (select id from auth_resource3 where name='menu|Dashboards|Documents'), 2); -INSERT INTO public.menu_meta (id, description, icon, "position", url, auth_resource3_id, scope_level) VALUES (67, 'Templates', NULL, 1, 'templateDashboard', (select id from auth_resource3 where name='menu|Dashboards|Templates'), 2); +INSERT INTO public.menu_meta (id, description, icon, "position", url, auth_resource3_id, scope_level) VALUES (66, 'My List', NULL, 0, 'documentDashboard', (select id from auth_resource3 where name='menu|Dashboards|Documents'), 2); +INSERT INTO public.menu_meta (id, description, icon, "position", url, auth_resource3_id, scope_level) VALUES (67, 'Shared List', NULL, 1, 'templateDashboard', (select id from auth_resource3 where name='menu|Dashboards|Templates'), 2); INSERT INTO public.menu_meta (id, description, icon, "position", url, auth_resource3_id, scope_level) VALUES (80, 'Hosts', '12.Hosts', 10, NULL, (select id from auth_resource3 where name='menu|Hosts'), 0); @@ -1083,8 +1090,8 @@ INSERT INTO public.metric_meta2 (id,meta_name,description,expr,resource_type,ent INSERT INTO public.metric_meta2 (id,meta_name,description,expr,resource_type,entity_type,groupby_keys,in_use,anomaly_score,message,created_date,modified_date) VALUES ('host_memory_usage','Host Memory Usage (%)','Host Memory Usage ','((node_memory_MemTotal_bytes{{filter}} - (node_memory_MemFree_bytes{{filter}} + node_memory_Cached_bytes{{filter}} + node_memory_Buffers_bytes{{filter}} + node_memory_SReclaimable_bytes{{filter}})) >= 0 or (node_memory_MemTotal_bytes{{filter}} - node_memory_MemFree_bytes{{filter}})) / node_memory_MemTotal_bytes{{filter}} * 100','Memory','Host',NULL,true,false,'Host:{{$labels.instance}} Memory Usage:{{humanize $value}}%|{threshold}%.','2020-03-26 06:36:47.931','2020-03-26 06:36:47.931'); INSERT INTO public.metric_meta2 (id,meta_name,description,expr,resource_type,entity_type,groupby_keys,in_use,anomaly_score,message,created_date,modified_date) VALUES ('host_memory_total','Host Memory Total (GiB)','Memory information field MemTotal_bytes','node_memory_MemTotal_bytes{{filter}}','Memory','Host',NULL,true,false,'Host:{{$labels.instance}} Total Memory Size:{{humanize $value}}GiB|{threshold}GiB.','2020-03-23 04:08:16.897','2020-03-23 04:08:16.897'); INSERT INTO public.metric_meta2 (id,meta_name,description,expr,resource_type,entity_type,groupby_keys,in_use,anomaly_score,message,created_date,modified_date) VALUES ('mysql_bytes_received_sent','Bytes Received & Sent in MySQL','Bytes Received & Sent in MySQL','sum by (data_type, xm_clst_id, xm_namespace, xm_node_id, instance) ( -label_replace(rate(mysql_global_status_bytes_received [1m]), "data_type", "received", "", "") or -label_replace(rate(mysql_global_status_bytes_sent [1m]), "data_type", "sent", "", ""))','Network','MySQL','data_type',true,false,'CLST:{{$labels.xm_clst_id}} NS:{{$labels.xm_namespace}} Container:{{$labels.xm_cont_name}} Cache Memory:{{humanize $value}}|{threshold}.','2019-12-05 07:58:11.000','2020-02-13 01:12:05.436'); + label_replace(rate(mysql_global_status_bytes_received [1m])/1024, "data_type", "received", "", "") or + label_replace(rate(mysql_global_status_bytes_sent [1m])/1024, "data_type", "sent", "", ""))','Network','MySQL','data_type',true,false,'CLST:{{$labels.xm_clst_id}} NS:{{$labels.xm_namespace}} Container:{{$labels.xm_cont_name}} Cache Memory:{{humanize $value}}|{threshold}.','2019-12-05 07:58:11.000','2020-02-13 01:12:05.436'); INSERT INTO public.metric_meta2 (id,meta_name,description,expr,resource_type,entity_type,groupby_keys,in_use,anomaly_score,message,created_date,modified_date) VALUES ('imxc_service_http_requests_time_95th','Service HTTP 95% Elapsed Time (ms)','the maximum time taken to servce the 95% of HTTP requests','histogram_quantile(0.95, sum by (xm_entity_type,xm_clst_id,xm_namespace,xm_service_name,le) (rate(imxc_service_request_milliseconds_bucket{xm_entity_type="Service",protocol="http",{filter}}[1m]))) >=0 or sum by (xm_entity_type,xm_clst_id,xm_namespace,xm_service_name) (rate(imxc_service_request_milliseconds_bucket{xm_entity_type="Service",protocol="http",{filter}}[1m]))','Request','Service',NULL,true,true,'SVC:{{$labels.xm_service_name}} 95th HTTP Requests Time:{{humanize $value}}ms|{threshold}ms.','2020-02-18 12:12:12.000','2020-02-18 12:12:12.000'); INSERT INTO public.metric_meta2 (id,meta_name,description,expr,resource_type,entity_type,groupby_keys,in_use,anomaly_score,message,created_date,modified_date) VALUES ('imxc_service_http_requests_time_99th','Service HTTP 99% Elapsed Time (ms)','the maximum time taken to servce the 99% of HTTP requests','histogram_quantile(0.99, sum by (xm_entity_type,xm_clst_id,xm_namespace,xm_service_name,le) (rate(imxc_service_request_milliseconds_bucket{xm_entity_type="Service",protocol="http",{filter}}[1m]))) >=0 or sum by (xm_entity_type,xm_clst_id,xm_namespace,xm_service_name) (rate(imxc_service_request_milliseconds_bucket{xm_entity_type="Service",protocol="http",{filter}}[1m]))','Request','Service',NULL,true,true,'SVC:{{$labels.xm_service_name}} 99th HTTP Requests Time:{{humanize $value}}ms|{threshold}ms.','2020-02-18 12:12:12.000','2020-02-18 12:12:12.000'); INSERT INTO public.metric_meta2 (id,meta_name,description,expr,resource_type,entity_type,groupby_keys,in_use,anomaly_score,message,created_date,modified_date) VALUES ('imxc_service_pod_http_error_rate','Service Pod HTTP Requests Error Rate','the number of HTTP error counts / the number of HTTP requests counts for pod','sum by (xm_clst_id,xm_service_name,xm_entity_type,xm_namespace,xm_pod_id) (rate(imxc_service_request_milliseconds_count{xm_entity_type="Service",protocol="http",{filter}}[1m])) == 0 or @@ -1148,8 +1155,8 @@ INSERT INTO public.metric_meta2 (id,meta_name,description,expr,resource_type,ent INSERT INTO public.metric_meta2 (id,meta_name,description,expr,resource_type,entity_type,groupby_keys,in_use,anomaly_score,message,created_date,modified_date) VALUES ('container_cpu_sum_by_pods','Container cpu sum by pod','Container cpu sum by pod','sum by(xm_clst_id, data_type, xm_pod_id) (label_replace(imxc_kubernetes_container_resource_request_cpu{{filter}} * 0.001, "data_type", "request" , "", "") or label_replace(imxc_kubernetes_container_resource_limit_cpu{{filter}} * 0.001, "data_type", "limit" , "", "") or label_replace(rate(container_cpu_usage_seconds_total{{filter}}[1m]), "data_type", "used", "" , ""))','CPU','Pod',NULL,false,false,'None','2020-05-21 06:50:49.546','2020-05-21 06:50:49.546'); INSERT INTO public.metric_meta2 (id,meta_name,description,expr,resource_type,entity_type,groupby_keys,in_use,anomaly_score,message,created_date,modified_date) VALUES ('container_memory_sum_by_pods','Container memory sum by pod','Container memory sum by pod','sum by(xm_clst_id, data_type, xm_pod_id) (label_replace(imxc_kubernetes_container_resource_limit_memory{{filter}}, "data_type", "limit", "" , "") or label_replace(imxc_kubernetes_container_resource_request_memory{{filter}}, "data_type", "request", "" , "") or label_replace(container_memory_usage_bytes{{filter}}, "data_type", "used", "" , ""))','Memory','Pod',NULL,false,false,'None','2020-05-21 06:50:49.546','2020-05-21 06:50:49.546'); INSERT INTO public.metric_meta2 (id,meta_name,description,expr,resource_type,entity_type,groupby_keys,in_use,anomaly_score,message,created_date,modified_date) VALUES ('container_memory_sum_by_container','Container memory sum by container','Container memory sum by container','sum by(xm_clst_id, data_type, xm_pod_id, xm_cont_name) (label_replace(imxc_kubernetes_container_resource_limit_memory{xm_cont_name!=''POD'',{filter}}, "data_type", "limit", "" , "") or label_replace(imxc_kubernetes_container_resource_request_memory{xm_cont_name!=''POD'',{filter}}, "data_type", "request", "" , "") or label_replace(container_memory_usage_bytes{xm_cont_name!=''POD'',{filter}}, "data_type", "used", "" , ""))','Memory','Container',NULL,false,false,'None','2020-05-21 06:50:49.546','2020-05-21 06:50:49.546'); -INSERT INTO public.metric_meta2 (id,meta_name,description,expr,resource_type,entity_type,groupby_keys,in_use,anomaly_score,message,created_date,modified_date) VALUES ('container_disk_read_write_byte','Container disk read and write bytes','Container disk read and write bytes','sum by(xm_clst_id, xm_pod_id, xm_cont_name, data_type) (label_replace(rate(container_fs_writes_bytes_total{xm_entity_type="Container",{filter}}[1m]), "data_type", "Read" , "", "") or label_replace(rate(container_fs_reads_bytes_total{xm_entity_type="Container",{filter}}[1m]), "data_type", "Write", "" , ""))','Disk','Container',NULL,false,false,'None','2020-05-21 06:50:49.546','2020-05-21 06:50:49.546'); -INSERT INTO public.metric_meta2 (id,meta_name,description,expr,resource_type,entity_type,groupby_keys,in_use,anomaly_score,message,created_date,modified_date) VALUES ('pod_disk_read_write_byte','Pod disk read and write bytes','Pod disk read and write bytes','sum by(xm_clst_id, xm_pod_id, data_type) (label_replace(rate(container_fs_writes_bytes_total{xm_entity_type="Container",{filter}}[1m]), "data_type", "Read" , "", "") or label_replace(rate(container_fs_reads_bytes_total{xm_entity_type="Container",{filter}}[1m]), "data_type", "Write", "" , ""))','Disk','Pod',NULL,false,false,'None','2020-05-21 06:50:49.546','2020-05-21 06:50:49.546'); +INSERT INTO public.metric_meta2 (id,meta_name,description,expr,resource_type,entity_type,groupby_keys,in_use,anomaly_score,message,created_date,modified_date) VALUES ('container_disk_read_write_byte','Container disk read and write bytes','Container disk read and write bytes','sum by(xm_clst_id, xm_pod_id, xm_cont_name, data_type) (label_replace(rate(container_fs_writes_bytes_total{xm_entity_type="Container",{filter}}[1m]), "data_type", "Write" , "", "") or label_replace(rate(container_fs_reads_bytes_total{xm_entity_type="Container",{filter}}[1m]), "data_type", "Read", "" , ""))','Disk','Container',NULL,false,false,'None','2020-05-21 06:50:49.546','2020-05-21 06:50:49.546'); +INSERT INTO public.metric_meta2 (id,meta_name,description,expr,resource_type,entity_type,groupby_keys,in_use,anomaly_score,message,created_date,modified_date) VALUES ('pod_disk_read_write_byte','Pod disk read and write bytes','Pod disk read and write bytes','sum by(xm_clst_id, xm_pod_id, data_type) (label_replace(rate(container_fs_writes_bytes_total{xm_entity_type="Container",{filter}}[1m]), "data_type", "Write" , "", "") or label_replace(rate(container_fs_reads_bytes_total{xm_entity_type="Container",{filter}}[1m]), "data_type", "Read", "" , ""))','Disk','Pod',NULL,false,false,'None','2020-05-21 06:50:49.546','2020-05-21 06:50:49.546'); INSERT INTO public.metric_meta2 (id,meta_name,description,expr,resource_type,entity_type,groupby_keys,in_use,anomaly_score,message,created_date,modified_date) VALUES ('container_network_io_byte','Container Network IO byte','Container Network IO byte','sum by (xm_clst_id, xm_pod_id, xm_cont_name, data_type) (label_replace(rate(container_network_receive_bytes_total{{filter}}[1m]), "data_type", "Receive", "", "") or label_replace(rate(container_network_transmit_bytes_total{{filter}}[1m]), "data_type", "Transmit", "", ""))','Network','Container',NULL,false,false,'None','2020-05-21 06:50:49.546','2020-05-21 06:50:49.546'); INSERT INTO public.metric_meta2 (id,meta_name,description,expr,resource_type,entity_type,groupby_keys,in_use,anomaly_score,message,created_date,modified_date) VALUES ('pod_network_io_byte','Pod Network IO byte','Pod Network IO byte','sum by (xm_clst_id, xm_pod_id, data_type) (label_replace(rate(container_network_receive_bytes_total{{filter}}[1m]), "data_type", "Receive", "", "") or label_replace(rate(container_network_transmit_bytes_total{{filter}}[1m]), "data_type", "Transmit", "", ""))','Network','Pod',NULL,false,false,'None','2020-05-21 06:50:49.546','2020-05-21 06:50:49.546'); INSERT INTO public.metric_meta2 (id,meta_name,description,expr,resource_type,entity_type,groupby_keys,in_use,anomaly_score,message,created_date,modified_date) VALUES ('node_load1','Node CPU Load 1m Average','Node CPU 1m load average','node_load1{xm_entity_type=''Node'',{filter}}','CPU','Node',NULL,true,true,'NODE:{{$labels.xm_node_id}} CPU 1m Load Avg:{{humanize $value}}|{threshold}.','2019-05-15 08:22:49.000','2019-05-15 08:22:49.000'); @@ -1189,10 +1196,10 @@ INSERT INTO public.metric_meta2 (id,meta_name,description,expr,resource_type,ent INSERT INTO public.metric_meta2 (id,meta_name,description,expr,resource_type,entity_type,groupby_keys,in_use,anomaly_score,message,created_date,modified_date) VALUES ('aws_ec2_cpuutilization','The percentage of allocated EC2 compute','The percentage of allocated EC2 compute units that are currently in use on the instance.','sum by (xm_clst_id, instance_id, instance) (aws_ec2_cpuutilization_average{{filter}})','CPU','AWS/EC2',NULL,true,true,'CLST:{{$labels.xm_clst_id}} Instance:{{$labels.instance_id}} CPU Utillization:{{humanize $value}}%|{threshold}%','2019-08-23 17:38:23.000','2019-08-23 17:38:23.000'); INSERT INTO public.metric_meta2 (id,meta_name,description,expr,resource_type,entity_type,groupby_keys,in_use,anomaly_score,message,created_date,modified_date) VALUES ('mongodb_connections','Number of Incoming Connections','The number of incoming connections from clients to the database server','sum by (xm_clst_id, xm_namespace, xm_node_id, instance, state) (mongodb_connections{{filter}})','Connection','MongoDB','state',true,true,'CLST:{{$labels.xm_clst_id}} NS:{{$labels.xm_namespace}} MongoDB Number of Incoming Connections Counts:{{humanize $value}}|{threshold}.','2019-12-04 16:45:00.000','2019-12-13 02:26:09.000'); INSERT INTO public.metric_meta2 (id,meta_name,description,expr,resource_type,entity_type,groupby_keys,in_use,anomaly_score,message,created_date,modified_date) VALUES ('mysql_buffer_io','Block read / write','mysql buffer I/O summary','sum by (data_type, xm_clst_id, xm_namespace, xm_node_id, instance) ( -label_replace(mysql_global_status_innodb_buffer_pool_write_requests, "data_type", "write", "", "") or -label_replace(mysql_global_status_innodb_buffer_pool_read_requests, "data_type", "read", "", "") )','Block','MySQL','data_type',true,false,'CLST:{{$labels.xm_clst_id}} NS:{{$labels.xm_namespace}} POD:{{$labels.xm_pod_id}} Mysql Buffer IO:{{humanize $value}}|{threshold}.','2019-12-05 07:30:33.000','2020-02-13 01:14:23.895'); +label_replace(irate(mysql_global_status_innodb_buffer_pool_write_requests[5m]), "data_type", "write", "", "") or +label_replace(irate(mysql_global_status_innodb_buffer_pool_read_requests[5m]), "data_type", "read", "", "") )','Block','MySQL','data_type',true,false,'CLST:{{$labels.xm_clst_id}} NS:{{$labels.xm_namespace}} POD:{{$labels.xm_pod_id}} Mysql Buffer IO:{{humanize $value}}|{threshold}.','2019-12-05 07:30:33.000','2020-02-13 01:14:23.895'); INSERT INTO public.metric_meta2 (id,meta_name,description,expr,resource_type,entity_type,groupby_keys,in_use,anomaly_score,message,created_date,modified_date) VALUES ('mysql_global_status_innodb_buffer_pool_reads','Number of Reads Directly from Disk','The number of logical reads that InnoDB could not satisfy from the buffer pool, and had to read directly from disk','sum by (xm_clst_id, xm_namespace, xm_node_id, instance) (rate(mysql_global_status_innodb_buffer_pool_reads[1m]))','Block','MySQL',NULL,true,true,'CLST:{{$labels.xm_clst_id}} NS:{{$labels.xm_namespace}} MySQL Number of Reads Directly from Disk Counts:{{humanize $value}}|{threshold}.','2019-12-04 16:45:00.000','2019-12-04 16:45:00.000'); -INSERT INTO public.metric_meta2 (id,meta_name,description,expr,resource_type,entity_type,groupby_keys,in_use,anomaly_score,message,created_date,modified_date) VALUES ('mysql_global_status_connections','Number of Connection Attempts','The number of connection attempts (successful or not) to the MySQL server','sum by (xm_clst_id, xm_namespace, xm_node_id, instance) (rate(mysql_global_status_connections[1m]))','Connection','MySQL',NULL,true,true,'CLST:{{$labels.xm_clst_id}} NS:{{$labels.xm_namespace}} MySQL Number of Connection Attempts counts:{{humanize $value}}|{threshold}.','2019-12-04 16:45:00.000','2019-12-04 16:45:00.000'); +INSERT INTO public.metric_meta2 (id,meta_name,description,expr,resource_type,entity_type,groupby_keys,in_use,anomaly_score,message,created_date,modified_date) VALUES ('mysql_global_status_connections','Number of Connection Attempts','The number of connection attempts (successful or not) to the MySQL server','max(max_over_time(mysql_global_status_threads_connected[5m]) or mysql_global_status_threads_connected )','Connection','MySQL','instance',true,true,'CLST:{{$labels.xm_clst_id}} NS:{{$labels.xm_namespace}} MySQL Number of Connection Attempts counts:{{humanize $value}}|{threshold}.','2019-12-04 16:45:00.000','2019-12-04 16:45:00.000'); INSERT INTO public.metric_meta2 (id,meta_name,description,expr,resource_type,entity_type,groupby_keys,in_use,anomaly_score,message,created_date,modified_date) VALUES ('mysql_status_locks','Number of Locks in MySQL','Number of Locks in MySQL','sum by (data_type, xm_clst_id, xm_namespace, xm_node_id, instance) ( label_replace(rate(mysql_global_status_innodb_row_lock_current_waits[1m]), "data_type", "rowlocks", "", "") or label_replace(rate(mysql_global_status_innodb_row_lock_waits[1m]), "data_type", "waits for rowlocks", "", "") or @@ -1208,7 +1215,6 @@ INSERT INTO public.metric_meta2 (id,meta_name,description,expr,resource_type,ent INSERT INTO public.metric_meta2 (id,meta_name,description,expr,resource_type,entity_type,groupby_keys,in_use,anomaly_score,message,created_date,modified_date) VALUES ('imxc_service_http_error_rate','Service HTTP Requests Error Rate','the number of HTTP error counts / the number of HTTP requests counts','sum by(xm_clst_id,xm_service_name,xm_entity_type,xm_namespace) (rate(imxc_service_request_milliseconds_count{xm_entity_type="Service",protocol="http",{filter}}[1m])) == 0 or sum by (xm_clst_id,xm_service_name,xm_entity_type,xm_namespace) (rate(imxc_service_errors_count{xm_entity_type="Service",protocol="http",{filter}}[1m])) / sum by (xm_clst_id,xm_service_name,xm_entity_type,xm_namespace) (rate(imxc_service_request_milliseconds_count{xm_entity_type="Service",protocol="http",{filter}}[1m]))','Request','Service',NULL,true,true,'SVC:{{$labels.xm_service_name}} Error Request Rate:{{humanize $value}}%|{threshold}%.','2019-10-15 09:37:44.000','2020-02-17 12:12:12.000'); -INSERT INTO public.metric_meta2 (id,meta_name,description,expr,resource_type,entity_type,groupby_keys,in_use,anomaly_score,message,created_date,modified_date) VALUES ('mysql_global_status_cache_hit_ratio','Buffer Cache Hit Ratio (%)','(Number of Logical Read - Number of Reads Directly from Disk) / (Number of Logical Read) * 100','sum by (xm_clst_id, xm_namespace, xm_node_id, instance) ((increase(mysql_global_status_innodb_buffer_pool_read_requests[1m]) - increase(mysql_global_status_innodb_buffer_pool_reads[1m])) / increase(mysql_global_status_innodb_buffer_pool_read_requests[1m]) * 100)','Block','MySQL',NULL,true,true,'CLST:{{$labels.xm_clst_id}} NS:{{$labels.xm_namespace}} MySQL Buffer Cache Hit Ratio:{{humanize $value}}%|{threshold}%.','2019-12-04 16:45:00.000','2019-12-04 16:45:00.000'); INSERT INTO public.metric_meta2 (id,meta_name,description,expr,resource_type,entity_type,groupby_keys,in_use,anomaly_score,message,created_date,modified_date) VALUES ('pod_fs_usage','Pod Filesystem Usage (%)','Pod File System Usage: 100 * (Used Bytes / Limit Bytes)','sum by (xm_clst_id,xm_pod_id,xm_entity_type,xm_namespace) ( container_fs_usage_bytes{xm_entity_type=''Container'',{filter}} /((container_fs_limit_bytes{xm_entity_type=''Container'',{filter}} * 100) > 0) or container_fs_usage_bytes{xm_entity_type=''Container'',{filter}} / 1000)','Filesystem','Pod',NULL,true,true,'CLST:{{$labels.xm_clst_id}} POD:{{$labels.xm_pod_id}} Filesystem Usage:{{humanize $value}}%|{threshold}%.','2019-06-05 10:27:42.000','2019-06-29 03:28:14.000'); @@ -1286,13 +1292,29 @@ INSERT INTO public.report_static(id, created_by, created_date, modified_by, modi '

1. Cluster Resource

Today''s cluster resource usage flow is shown.

1. CPU Usage

Abnormally high CPU usage by particular programs can be an indication that there is something wrong with the computer system.

${metricItem1587977724113}

2. Memory Usage

The Memory Usage window displays the amount of memory available on your system, as well as the memory currently in use by all applications, including Windows itself.

${metricItem1588037028605}

3. Network

A network transmit/receive provides basic network utilization data in relation to the available network capacity.

Transmit

${metricItem1588059107546}

Receive

${metricItem1588059110952}

2. Pod

1. Allocated Pods Count Trend

Running Pod Count
${metricItem1588059623963}







', 'cloudmoa Cluster Daily Report', 'manual', (select id from report_template where title='cloudmoa Cluster Daily Report')); --- INSERT INTO public.dashboard2 (id, created_date, modified_date, layout, title, auth_resource_id, created_by, modified_by, description, "share") VALUES(nextval('hibernate_sequence'), '2020-04-28 09:23:14.286', '2020-04-28 09:23:44.213', '[{"i":"widget0","widget":{"header":"default-header","body":"event-view"},"w":48,"h":2,"minW":2,"minH":1,"maxW":48,"maxH":36,"component":{"params":{"targets":["widget1","widget2","widget3","widget4","widget5","widget6","widget7","widget8"],"action":"changeFilter","options":{"clusterId":{"mod":true,"value":"cloudmoa"},"namespace":{"mod":false,"value":null},"entity":{"mod":true,"type":["node"],"value":["exem-master","exem-node001","exem-node002"]}}},"visualization":{"type":"select"}},"x":0,"y":0},{"i":"widget1","widget":{"header":"default-header","body":"line-chart-view","title":"CPU Usage"},"w":18,"h":11,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":"cloudmoa","metricId":"node_disk_read_latency","entityId":[],"type":"node","namespace":"default"}},"visualization":{"showLegend":true}},"x":0,"y":2},{"i":"widget2","widget":{"header":"default-header","body":"horizontal-bar-chart-view","title":"Memory Usage"},"w":18,"h":11,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":false,"clusterId":"cloudmoa","metricId":"node_memory_usage","entityId":[],"type":"node"}},"visualization":{"showLegend":true}},"x":0,"y":13},{"i":"widget3","widget":{"header":"default-header","body":"line-chart-view","title":"Network Transmit (KiB)"},"w":15,"h":11,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":"cloudmoa","metricId":"node_network_transmit","entityId":[],"type":"node","namespace":"default"}},"visualization":{"showLegend":true}},"x":18,"y":2},{"i":"widget4","widget":{"header":"default-header","body":"line-chart-view","title":"Network Receive (KiB)"},"w":15,"h":11,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":"cloudmoa","metricId":"node_network_receive","entityId":[],"type":"node","namespace":"default"}},"visualization":{"showLegend":true}},"x":33,"y":2},{"i":"widget5","widget":{"header":"default-header","body":"stack-bar-chart-view","title":"Pod Running Count"},"w":30,"h":12,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":"cloudmoa","metricId":"node_pod_running_count","entityId":[],"type":"node","namespace":"default"}},"visualization":{"showLegend":true}},"x":18,"y":24},{"i":"widget6","widget":{"header":"default-header","body":"stack-bar-chart-view","title":"Disk Read Latency (ms)"},"w":15,"h":11,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":"cloudmoa","metricId":"node_disk_read_latency","entityId":[],"type":"node","namespace":"default"}},"visualization":{"showLegend":true}},"x":18,"y":13},{"i":"widget7","widget":{"header":"default-header","body":"stack-bar-chart-view","title":"Disk Write Latency (ms)"},"w":15,"h":11,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":"cloudmoa","metricId":"node_disk_write_latency","entityId":[],"type":"node","namespace":"default"}},"visualization":{"showLegend":true}},"x":33,"y":13},{"i":"widget8","widget":{"header":"default-header","body":"stack-bar-chart-view","title":"Filesystem Usage (%)"},"w":18,"h":12,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":"cloudmoa","metricId":"node_filesystem_usage","entityId":[],"type":"node","namespace":"default"}},"visualization":{"showLegend":true}},"x":0,"y":24}]', 'CloudMOA - Nodes Resource', (select id from auth_resource2 where name='CloudMOA - Nodes Resource'), 'admin', 'admin', NULL, true); --- INSERT INTO public.dashboard2 (id, created_date, modified_date, layout, title, auth_resource_id, created_by, modified_by, description, "share") VALUES(nextval('hibernate_sequence'), '2020-04-28 09:23:14.286', '2020-04-28 09:23:44.213', '[{"i":"widget0","widget":{"header":"default-header","body":"service-tps-view","title":"Service TPS"},"w":24,"h":7,"minW":12,"minH":6,"maxW":48,"maxH":16,"component":{"api":{"uri":"metric.chart","params":{"clusterId":null,"namespace":null,"entityId":null,"type":"service","range":false}}},"x":0,"y":2},{"i":"widget1","widget":{"header":"default-header","body":"event-view"},"w":48,"h":2,"minW":2,"minH":2,"maxW":48,"maxH":36,"component":{"params":{"targets":["widget0","widget2","widget3","widget4","widget5","widget6","widget7","widget8"],"action":"changeFilter","options":{"clusterId":{"mod":true,"value":null},"namespace":{"mod":true,"value":null},"entity":{"mod":true,"type":["service"],"value":[]}}},"visualization":{"type":"select"}},"viewStyle":{"backgroundColor":"#252525"},"x":0,"y":0},{"i":"widget2","widget":{"header":"default-header","body":"service-treeMap-view"},"w":24,"h":21,"minW":20,"minH":10,"maxW":48,"maxH":48,"component":{"api":{"uri":"metric.chart","params":{"clusterId":null,"namespace":null,"entityId":null,"type":"service","range":false}}},"x":24,"y":2},{"i":"widget3","widget":{"header":"default-header","body":"stack-bar-chart-view","title":"Service Request Count"},"w":12,"h":7,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":null,"namespace":null,"metricId":"imxc_service_http_requests_per_sec","entityId":"","type":null}},"visualization":{"showLegend":true}},"x":0,"y":9},{"i":"widget4","widget":{"header":"default-header","body":"stack-bar-chart-view","title":"Service Total Error Count"},"w":12,"h":7,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":null,"namespace":null,"metricId":"imxc_service_errors_count","entityId":"","type":null}},"visualization":{"showLegend":true}},"x":0,"y":16},{"i":"widget5","widget":{"header":"default-header","body":"scatter-chart-view","bodyClass":["drag-ignore"],"title":"Xview","headerClass":["drag-handle"]},"w":24,"h":13,"minW":20,"minH":12,"maxW":68,"maxH":60,"component":{"api":{"params":{}}},"x":0,"y":23},{"i":"widget6","widget":{"header":"default-header","body":"event-list-view","title":"Event List"},"w":24,"h":13,"minW":24,"minH":12,"maxW":48,"maxH":36,"component":{"api":{"params":{"clusterId":null}}},"x":24,"y":23},{"i":"widget7","widget":{"header":"default-header","body":"line-chart-view","title":"Service Latency"},"w":12,"h":7,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":null,"namespace":null,"metricId":"imxc_service_http_requests_time_avg","entityId":"","type":null}},"visualization":{"showLegend":true}},"x":12,"y":9},{"i":"widget8","widget":{"header":"default-header","body":"stack-bar-chart-view","title":"Service Total Transaction Count"},"w":12,"h":7,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":null,"namespace":null,"metricId":"imxc_service_http_requests_per_sec_by_api","entityId":"","type":null}},"visualization":{"showLegend":true}},"x":12,"y":16}]', 'Service Detail', (select id from auth_resource2 where name='Service Detail'), 'admin', 'admin', NULL, true); +-- Dashboard 추가 (Nodes Resource , Service Detail , Postgres , Redis , Traefik , MySQL / MariaDB , Nginx-Ingress) +INSERT INTO public.dashboard2 (id, created_date, modified_date, layout, title, auth_resource_id, created_by, modified_by, description, "share") + VALUES(nextval('hibernate_sequence'), '2020-04-28 09:23:14.286', '2020-04-28 09:23:44.213', '[{"i":"widget0","widget":{"header":"default-header","body":"event-view","title":"Select Filter"},"w":48,"h":3,"minW":2,"minH":1,"maxW":48,"maxH":36,"component":{"params":{"targets":["widget1","widget2","widget3","widget4","widget5","widget6","widget7","widget8"],"action":"changeFilter","options":{"clusterId":{"mod":true,"value":"kBGYTL7cig0gOck0"},"namespace":{"mod":false,"value":null},"entity":{"mod":true,"type":["node"],"value":["cmoa-jspd-master","cmoa-jspd-worker1-contd","cmoa-jspd-worker2-crio"]}}},"visualization":{"type":"select"}},"viewStyle":{"backgroundColor":"#252525"},"x":0,"y":0,"static":true},{"i":"widget1","widget":{"header":"default-header","body":"line-chart-view","title":"CPU Usage"},"w":18,"h":11,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":"cloudmoa","metricId":"node_disk_read_latency","entityId":[],"type":"node","namespace":"default"}},"visualization":{"showLegend":true}},"x":0,"y":3,"static":true},{"i":"widget2","widget":{"header":"default-header","body":"horizontal-bar-chart-view","title":"Memory Usage"},"w":18,"h":11,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":false,"clusterId":"cloudmoa","metricId":"node_memory_usage","entityId":[],"type":"node"}},"visualization":{"showLegend":true}},"x":0,"y":14,"static":true},{"i":"widget3","widget":{"header":"default-header","body":"line-chart-view","title":"Network Transmit (KiB)"},"w":15,"h":11,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":"cloudmoa","metricId":"node_network_transmit","entityId":[],"type":"node","namespace":"default"}},"visualization":{"showLegend":true}},"x":18,"y":3,"static":true},{"i":"widget4","widget":{"header":"default-header","body":"line-chart-view","title":"Network Receive (KiB)"},"w":15,"h":11,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":"cloudmoa","metricId":"node_network_receive","entityId":[],"type":"node","namespace":"default"}},"visualization":{"showLegend":true}},"x":33,"y":3,"static":true},{"i":"widget5","widget":{"header":"default-header","body":"stack-bar-chart-view","title":"Pod Running Count"},"w":30,"h":12,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":"cloudmoa","metricId":"node_pod_running_count","entityId":[],"type":"node","namespace":"default"}},"visualization":{"showLegend":true}},"x":18,"y":25,"static":true},{"i":"widget6","widget":{"header":"default-header","body":"stack-bar-chart-view","title":"Disk Read Latency (ms)"},"w":15,"h":11,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":"cloudmoa","metricId":"node_disk_read_latency","entityId":[],"type":"node","namespace":"default"}},"visualization":{"showLegend":true}},"x":18,"y":14,"static":true},{"i":"widget7","widget":{"header":"default-header","body":"stack-bar-chart-view","title":"Disk Write Latency (ms)"},"w":15,"h":11,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":"cloudmoa","metricId":"node_disk_write_latency","entityId":[],"type":"node","namespace":"default"}},"visualization":{"showLegend":true}},"x":33,"y":14,"static":true},{"i":"widget8","widget":{"header":"default-header","body":"stack-bar-chart-view","title":"Filesystem Usage (%)"},"w":18,"h":12,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":"cloudmoa","metricId":"node_filesystem_usage","entityId":[],"type":"node","namespace":"default"}},"visualization":{"showLegend":true}},"x":0,"y":25,"static":true}]', + 'Nodes Resource', (select id from auth_resource3 where name='dashboard|admin|Nodes Resource'), 'admin', 'admin', NULL, true); +INSERT INTO public.dashboard2 (id, created_date, modified_date, layout, title, auth_resource_id, created_by, modified_by, description, "share") + VALUES(nextval('hibernate_sequence'), '2020-04-28 09:23:14.286', '2020-04-28 09:23:44.213', '[{"i":"widget0","widget":{"header":"default-header","body":"service-tps-view","title":"Service TPS"},"w":24,"h":7,"minW":12,"minH":6,"maxW":48,"maxH":16,"component":{"api":{"uri":"metric.chart","params":{"clusterId":null,"namespace":null,"entityId":null,"type":"service","range":false,"jspdCluster":null}}},"x":0,"y":3,"static":true},{"i":"widget1","widget":{"header":"default-header","body":"event-view","title":"Select Filter"},"w":48,"h":3,"minW":2,"minH":2,"maxW":48,"maxH":36,"component":{"params":{"targets":["widget0","widget2","widget3","widget4","widget5","widget6","widget7","widget8"],"action":"changeFilter","options":{"clusterId":{"mod":true,"value":"cloudmoa"},"namespace":{"mod":true,"value":"imxc"},"entity":{"mod":true,"type":["service"],"value":[]}}},"visualization":{"type":"select"}},"viewStyle":{"backgroundColor":"#252525"},"x":0,"y":0,"static":true},{"i":"widget2","widget":{"header":"default-header","body":"service-treeMap-view","title":"Service TreeMap"},"w":24,"h":21,"minW":20,"minH":10,"maxW":48,"maxH":48,"component":{"api":{"uri":"metric.chart","params":{"clusterId":null,"namespace":null,"entityId":null,"type":"service","range":false}}},"x":24,"y":3,"static":true},{"i":"widget3","widget":{"header":"default-header","body":"stack-bar-chart-view","title":"Service Request Count"},"w":12,"h":7,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":null,"namespace":null,"metricId":"imxc_service_http_requests_per_sec","entityId":"","type":null}},"visualization":{"showLegend":true}},"x":0,"y":10,"static":true},{"i":"widget4","widget":{"header":"default-header","body":"stack-bar-chart-view","title":"Service Total Error Count"},"w":12,"h":7,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":null,"namespace":null,"metricId":"imxc_service_errors_count","entityId":"","type":null}},"visualization":{"showLegend":true}},"x":0,"y":17,"static":true},{"i":"widget5","widget":{"header":"default-header","body":"scatter-chart-view","bodyClass":["drag-ignore"],"title":"Xview","headerClass":["drag-handle"]},"w":24,"h":13,"minW":20,"minH":12,"maxW":68,"maxH":60,"component":{"api":{"params":{}}},"x":0,"y":24,"static":true},{"i":"widget6","widget":{"header":"default-header","body":"event-list-view","title":"Event List"},"w":24,"h":13,"minW":24,"minH":12,"maxW":48,"maxH":36,"component":{"api":{"params":{"clusterId":null,"namespace":null}}},"x":24,"y":24,"static":true},{"i":"widget7","widget":{"header":"default-header","body":"line-chart-view","title":"Service Latency"},"w":12,"h":7,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":null,"namespace":null,"metricId":"imxc_service_http_requests_time_avg","entityId":"","type":null}},"visualization":{"showLegend":true}},"x":12,"y":10,"static":true},{"i":"widget8","widget":{"header":"default-header","body":"stack-bar-chart-view","title":"Service Total Transaction Count"},"w":12,"h":7,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":null,"namespace":null,"metricId":"imxc_service_http_requests_per_sec_by_api","entityId":"","type":null}},"visualization":{"showLegend":true}},"x":12,"y":17,"static":true}]', + 'Service Detail', (select id from auth_resource3 where name='dashboard|admin|Service Detail'), 'admin', 'admin', NULL, true); +INSERT INTO public.dashboard2 (id, created_date, modified_date, layout, title, auth_resource_id, created_by, modified_by, description, "share") + VALUES(nextval('hibernate_sequence'), '2020-04-28 09:23:14.286', '2020-04-28 09:23:44.213', '[{"i":"widget0","widget":{"header":"default-header","body":"label-view","title":" "},"w":48,"h":3,"minW":2,"minH":1,"maxW":48,"maxH":36,"component":{"api":{},"visualization":{"background":null,"fontSize":18,"textAlign":"left","padding":[0,18],"sideways":false,"fontWeight":"bold","text":"Resource Utilization"}},"x":0,"y":9,"static":true},{"i":"widget1","widget":{"header":"default-header","body":"line-chart-view","title":"CPU Usage (%)","description":"postgres에 대한 pod들의 cpu 사용량"},"w":12,"h":10,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":"cloudmoa","namespace":"imxc","metricId":"container_cpu_usage_by_workload","entityId":"postgres","type":"workload"}},"visualization":{"showLegend":true}},"x":0,"y":12,"static":true},{"i":"widget2","widget":{"header":"default-header","body":"line-chart-view","title":"Memory Usage (GiB)"},"w":12,"h":10,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":"cloudmoa","namespace":"imxc","metricId":"container_memory_working_set_bytes_by_workload","entityId":"postgres","type":"workload"}},"visualization":{"showLegend":true}},"x":12,"y":12,"static":true},{"i":"widget4","widget":{"header":"default-header","body":"line-chart-view","title":"Network Recieved (KiB)"},"w":12,"h":10,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":"cloudmoa","namespace":"imxc","metricId":"container_network_receive_by_workload","entityId":"postgres","type":"workload"}},"visualization":{"showLegend":true,"background":null,"fontSize":12,"textAlign":"center","padding":[0,18],"sideways":false}},"x":36,"y":12,"static":true},{"i":"widget3","widget":{"header":"default-header","body":"line-chart-view","title":"Network Transmit (KiB)"},"w":12,"h":10,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":"cloudmoa","namespace":"imxc","metricId":"container_network_transmit_by_workload","entityId":"postgres","type":"workload"}},"visualization":{"showLegend":true}},"x":24,"y":12,"static":true},{"i":"widget5","widget":{"header":"default-header","body":"label-view","title":" "},"w":48,"h":3,"minW":2,"minH":1,"maxW":48,"maxH":36,"component":{"api":{},"visualization":{"background":null,"fontSize":18,"textAlign":"left","padding":[0,18],"sideways":false,"fontWeight":"bold","text":"General Statics"}},"x":0,"y":22,"static":true},{"i":"widget6","widget":{"header":"default-header","body":"horizontal-bar-chart-view","title":"Lock mode"},"w":24,"h":11,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":false,"clusterId":"cloudmoa","namespace":"","metricId":"pg_count_by_lockmode","entityId":"","type":"PostgreSQL","filter":""}},"visualization":{"showLegend":true}},"x":0,"y":25,"static":true},{"i":"widget7","widget":{"header":"default-header","body":"horizontal-bar-chart-view","title":"Connection By DB and State"},"w":24,"h":11,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":false,"clusterId":"cloudmoa","namespace":"","metricId":"pg_count_by_dbname_state","entityId":"","type":"PostgreSQL","filter":""}},"visualization":{"showLegend":true}},"x":24,"y":25,"static":true},{"i":"widget8","widget":{"header":"default-header","body":"stat-view","title":"Number of Client Connection"},"w":17,"h":6,"minW":6,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":true,"range":false,"clusterId":"cloudmoa","namespace":"","metricId":"pg_stat_activity_count","entityId":"","type":"PostgreSQL","filter":""}},"visualization":{"showGauge":false,"showPercent":false,"min":null,"max":null,"decimals":2,"baseColor":"#409EFF","thresholds":[],"showLegend":true}},"x":15,"y":3,"static":true},{"i":"widget9","widget":{"header":"default-header","body":"label-view","title":" "},"w":48,"h":3,"minW":2,"minH":1,"maxW":48,"maxH":36,"component":{"api":{},"visualization":{"background":null,"fontSize":18,"textAlign":"left","padding":[0,18],"sideways":false,"fontWeight":"bold","text":"Overview"}},"x":0,"y":0,"static":true},{"i":"widget11","widget":{"header":"default-header","body":"stat-view","title":"Lock Count"},"w":16,"h":6,"minW":6,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":true,"range":false,"clusterId":"cloudmoa","namespace":"","metricId":"pg_locks_count","entityId":"","type":"PostgreSQL","filter":""}},"visualization":{"showGauge":false,"showPercent":false,"min":null,"max":null,"decimals":2,"baseColor":"#409EFF","thresholds":[]}},"x":32,"y":3,"static":true},{"i":"widget10","widget":{"header":"default-header","body":"stat-view","title":"Up"},"w":15,"h":6,"minW":6,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":true,"range":false,"clusterId":"cloudmoa","namespace":"","metricId":"pg_up","entityId":"","type":"PostgreSQL","filter":""}},"visualization":{"showGauge":false,"showPercent":false,"min":null,"max":null,"decimals":2,"baseColor":"#409EFF","thresholds":[{"color":"#32AC2D","value":"1"}]}},"x":0,"y":3,"static":true},{"i":"widget12","widget":{"header":"default-header","body":"line-chart-view","title":"Buffer Cache Hit Ratio (%)"},"w":24,"h":11,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":"cloudmoa","namespace":"","metricId":"pg_stat_database_cache_hit_ratio","entityId":"","type":"PostgreSQL","filter":""}},"visualization":{"showLegend":true,"showGauge":false,"showPercent":false,"min":null,"max":null,"decimals":2,"baseColor":"#409EFF","thresholds":[]}},"x":0,"y":36,"static":true},{"i":"widget13","widget":{"header":"default-header","body":"line-chart-view","title":"Read/Write spent time by file blocks"},"w":24,"h":11,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":"cloudmoa","namespace":"","metricId":"pg_stat_database_blk_read_write_time","entityId":"","type":"PostgreSQL","filter":""}},"visualization":{"showLegend":true,"row":8,"column":["date","value"]}},"x":24,"y":36,"static":true},{"i":"widget14","widget":{"header":"default-header","body":"label-view","title":" "},"w":48,"h":3,"minW":2,"minH":1,"maxW":48,"maxH":36,"component":{"api":{},"visualization":{"background":null,"fontSize":18,"textAlign":"left","padding":[0,18],"sideways":false,"fontWeight":"bold","text":"Block"}},"x":0,"y":47,"static":true},{"i":"widget15","widget":{"header":"default-header","body":"line-chart-view","title":"Number of Disk Blocks Read"},"w":48,"h":11,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":"cloudmoa","namespace":"","metricId":"pg_stat_database_blks_read","entityId":"","type":"PostgreSQL","filter":""}},"visualization":{"showLegend":true}},"x":0,"y":61,"static":true},{"i":"widget17","widget":{"header":"default-header","body":"line-chart-view","title":"Number of Rows Inserted"},"w":24,"h":11,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":"cloudmoa","namespace":"","metricId":"pg_stat_database_tup_inserted","entityId":"","type":"PostgreSQL","filter":""}},"visualization":{"showLegend":true}},"x":0,"y":75,"static":true},{"i":"widget18","widget":{"header":"default-header","body":"line-chart-view","title":"Time Spent Reading Data File Blocks (ms)"},"w":24,"h":11,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":"cloudmoa","namespace":"","metricId":"pg_stat_database_blk_read_time","entityId":"","type":"PostgreSQL","filter":""}},"visualization":{"showLegend":true}},"x":0,"y":50,"static":true},{"i":"widget19","widget":{"header":"default-header","body":"line-chart-view","title":"Time Spent Writing Data File Blocks (ms)"},"w":24,"h":11,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":"cloudmoa","namespace":"","metricId":"pg_stat_database_blk_write_time","entityId":"","type":"PostgreSQL","filter":""}},"visualization":{"showLegend":true}},"x":24,"y":50,"static":true},{"i":"widget20","widget":{"header":"default-header","body":"label-view","title":" "},"w":48,"h":3,"minW":2,"minH":1,"maxW":48,"maxH":36,"component":{"api":{},"visualization":{"background":null,"fontSize":18,"textAlign":"left","padding":[0,18],"sideways":false,"fontWeight":"bold","text":"Row"}},"x":0,"y":72,"static":true},{"i":"widget16","widget":{"header":"default-header","body":"line-chart-view","title":"Number of Rows Updated"},"w":24,"h":11,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":"cloudmoa","namespace":"","metricId":"pg_stat_database_tup_updated","entityId":"","type":"PostgreSQL","filter":""}},"visualization":{"showLegend":true}},"x":24,"y":75,"static":true},{"i":"widget21","widget":{"header":"default-header","body":"stack-bar-chart-view","title":"Number of Transactions Committed"},"w":24,"h":10,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":"cloudmoa","namespace":"","metricId":"pg_stat_database_xact_commit","entityId":"","type":"PostgreSQL","filter":""}},"visualization":{"showLegend":true}},"x":0,"y":110,"static":true},{"i":"widget22","widget":{"header":"default-header","body":"line-chart-view","title":"Number of Rows Returned"},"w":48,"h":10,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":"cloudmoa","namespace":"","metricId":"pg_stat_database_tup_returned","entityId":"","type":"PostgreSQL","filter":""}},"visualization":{"showLegend":true}},"x":0,"y":97,"static":true},{"i":"widget23","widget":{"header":"default-header","body":"line-chart-view","title":"Number of Rows Fetched"},"w":24,"h":11,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":"cloudmoa","namespace":"","metricId":"pg_stat_database_tup_fetched","entityId":"","type":"PostgreSQL","filter":""}},"visualization":{"showLegend":true}},"x":24,"y":86,"static":true},{"i":"widget24","widget":{"header":"default-header","body":"line-chart-view","title":"Number of Rows Deleted"},"w":24,"h":11,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":"cloudmoa","namespace":"","metricId":"pg_stat_database_tup_deleted","entityId":"","type":"PostgreSQL","filter":""}},"visualization":{"showLegend":true}},"x":0,"y":86,"static":true},{"i":"widget25","widget":{"header":"default-header","body":"label-view","title":" "},"w":48,"h":3,"minW":2,"minH":1,"maxW":48,"maxH":36,"component":{"api":{},"visualization":{"background":null,"fontSize":18,"textAlign":"left","padding":[0,18],"sideways":false,"fontWeight":"bold","text":"Transaction"}},"x":0,"y":107,"static":true},{"i":"widget26","widget":{"header":"default-header","body":"stack-bar-chart-view","title":"Number of Transactions Rolled Back"},"w":24,"h":10,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":"cloudmoa","namespace":"","metricId":"pg_stat_database_xact_rollback","entityId":"","type":"PostgreSQL","filter":""}},"visualization":{"showLegend":true}},"x":24,"y":110,"static":true}]', + 'Postgres', (select id from auth_resource3 where name='dashboard|admin|Postgres'), 'admin', 'admin', NULL, true); +INSERT INTO public.dashboard2 (id, created_date, modified_date, layout, title, auth_resource_id, created_by, modified_by, description, "share") + VALUES(nextval('hibernate_sequence'), '2020-04-28 09:23:14.286', '2020-04-28 09:23:44.213', '[{"i":"widget0","widget":{"header":"default-header","body":"line-chart-view","title":"CPU Usage (%)","description":"Redis Pod에 대한 CPU 사용량"},"w":12,"h":10,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":"cloudmoa","namespace":"imxc","metricId":"container_cpu_usage_core_by_workload","entityId":"redis-master,redis-slave","type":"workload","filter":""}},"visualization":{"showLegend":true}},"x":0,"y":7,"static":true},{"i":"widget1","widget":{"header":"default-header","body":"line-chart-view","title":"Memory Usage (GiB)"},"w":12,"h":10,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":"cloudmoa","namespace":"imxc","metricId":"container_memory_usage_bytes_by_workload","entityId":"redis-master,redis-slave","type":"workload","filter":""}},"visualization":{"showLegend":true}},"x":12,"y":7,"static":true},{"i":"widget2","widget":{"header":"default-header","body":"line-chart-view","title":"Network Transmit (KB)"},"w":12,"h":10,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":"cloudmoa","namespace":"imxc","metricId":"container_network_transmit_by_workload","entityId":"redis-master,redis-slave","type":"workload"}},"visualization":{"showLegend":true}},"x":24,"y":7,"static":true},{"i":"widget3","widget":{"header":"default-header","body":"line-chart-view","title":"Network Recieved (KiB)"},"w":12,"h":10,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":"cloudmoa","namespace":"imxc","metricId":"container_network_receive_by_workload","entityId":"redis-master,redis-slave","type":"workload"}},"visualization":{"showLegend":true}},"x":36,"y":7,"static":true},{"i":"widget4","widget":{"header":"default-header","body":"stat-view","title":"Redis Up Count"},"w":12,"h":7,"minW":6,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":true,"range":false,"clusterId":"cloudmoa","namespace":"","metricId":"redis_up","entityId":"","type":"Redis","filter":""}},"visualization":{"showGauge":false,"showPercent":false,"min":null,"max":null,"decimals":2,"baseColor":"#409EFF","thresholds":[{"color":"#32AC2D","value":"1"}]}},"x":0,"y":0,"static":true},{"i":"widget5","widget":{"header":"default-header","body":"stat-view","title":"Connected Clients Count"},"w":12,"h":7,"minW":6,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":true,"range":false,"clusterId":"cloudmoa","namespace":"","metricId":"redis_connected_clients","entityId":"","type":"Redis","filter":""}},"visualization":{"showGauge":false,"showPercent":false,"min":null,"max":null,"decimals":2,"baseColor":"#409EFF","thresholds":[]}},"x":12,"y":0,"static":true},{"i":"widget6","widget":{"header":"default-header","body":"stat-view","title":"Blocked Client Count"},"w":12,"h":7,"minW":6,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":true,"range":false,"clusterId":"cloudmoa","namespace":"","metricId":"redis_blocked_clients","entityId":"","type":"Redis","filter":""}},"visualization":{"showGauge":false,"showPercent":false,"min":null,"max":null,"decimals":null,"baseColor":"#409EFF","thresholds":[],"showLegend":true}},"x":36,"y":0,"static":true},{"i":"widget7","widget":{"header":"default-header","body":"horizontal-bar-chart-view","title":"Calls per command"},"w":24,"h":11,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":false,"clusterId":"cloudmoa","namespace":"","metricId":"redis_commands_total","entityId":"","type":"Redis","filter":""}},"visualization":{"showLegend":true,"showGauge":false,"showPercent":false,"min":null,"max":null,"decimals":null,"baseColor":"#409EFF","thresholds":[]}},"x":0,"y":26,"static":true},{"i":"widget8","widget":{"header":"default-header","body":"line-chart-view","title":"Command duration"},"w":24,"h":11,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":"cloudmoa","namespace":"","metricId":"redis_commands_duration_seconds","entityId":"","type":"Redis","filter":"","jspdCluster":null}},"visualization":{"showLegend":true}},"x":24,"y":26,"static":true},{"i":"widget9","widget":{"header":"default-header","body":"stat-view","title":"Rejected Client Count"},"w":12,"h":7,"minW":6,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":true,"range":false,"clusterId":"cloudmoa","namespace":"","metricId":"redis_rejected_connections","entityId":"","type":"Redis","filter":""}},"visualization":{"showGauge":false,"showPercent":false,"min":null,"max":null,"decimals":2,"baseColor":"#409EFF","thresholds":[]}},"x":24,"y":0,"static":true},{"i":"widget10","widget":{"header":"default-header","body":"line-chart-view","title":"DB Key"},"w":24,"h":11,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":"cloudmoa","namespace":"","metricId":"redis_db_keys","entityId":"","type":"Redis","filter":""}},"visualization":{"showLegend":true}},"x":0,"y":37,"static":true},{"i":"widget11","widget":{"header":"default-header","body":"line-chart-view","title":"DB Expired Key"},"w":24,"h":11,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":"cloudmoa","namespace":"","metricId":"redis_expired_keys","entityId":"","type":"Redis","filter":""}},"visualization":{"showLegend":true}},"x":24,"y":37,"static":true},{"widget":{"header":"default-header","body":"stat-view","title":"Connected Slave"},"w":16,"h":9,"minW":6,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":true,"range":false,"clusterId":"cloudmoa","namespace":"","metricId":"redis_connected_slaves","entityId":"","type":"Redis","filter":""}},"visualization":{"showLegend":true,"showGauge":false,"showPercent":false,"min":null,"max":null,"decimals":2,"baseColor":"#409EFF","thresholds":[]}},"i":"widget12","static":true,"x":0,"y":17},{"widget":{"header":"default-header","body":"line-chart-view","title":"Slave Offset Bytes"},"w":16,"h":9,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":"cloudmoa","namespace":"","metricId":"redis_connected_slave_offset_bytes","entityId":"","type":"Redis","filter":""}},"visualization":{"showLegend":true}},"i":"widget13","static":true,"x":16,"y":17},{"widget":{"header":"default-header","body":"line-chart-view","title":"Slave Lag Seconds"},"w":16,"h":9,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":"cloudmoa","namespace":"","metricId":"redis_connected_slave_lag_seconds","entityId":"","type":"Redis","filter":""}},"visualization":{"showLegend":true}},"i":"widget14","static":true,"x":32,"y":17}]', + 'Redis', (select id from auth_resource3 where name='dashboard|admin|Redis'), 'admin', 'admin', NULL, true); +INSERT INTO public.dashboard2 (id, created_date, modified_date, layout, title, auth_resource_id, created_by, modified_by, description, "share") + VALUES(nextval('hibernate_sequence'), '2020-04-28 09:23:14.286', '2020-04-28 09:23:44.213', '[{"i":"widget0","widget":{"header":"default-header","body":"stat-view","title":"4xx Error Per Seconds"},"w":8,"h":7,"minW":6,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":true,"range":false,"clusterId":"cloudmoa","namespace":"","metricId":"traefik_4xx_error_rate_last_5m","entityId":"","type":"Traefik","filter":""}},"visualization":{"showGauge":false,"showPercent":false,"min":null,"max":null,"decimals":2,"baseColor":"rgba(255, 0, 0, 1)","thresholds":[],"showLegend":true}},"x":8,"y":0,"static":true},{"i":"widget1","widget":{"header":"default-header","body":"stat-view","title":"5xx Error Per Seconds"},"w":8,"h":7,"minW":6,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":true,"range":false,"clusterId":"cloudmoa","namespace":"","metricId":"traefik_5xx_error_rate_last_5m","entityId":"","type":"Traefik","filter":""}},"visualization":{"showGauge":false,"showPercent":false,"min":null,"max":null,"decimals":2,"baseColor":"rgba(255, 0, 0, 1)","thresholds":[]}},"x":16,"y":0,"static":true},{"i":"widget2","widget":{"header":"default-header","body":"line-chart-view","title":"Pod CPU Utilization (Core)"},"w":24,"h":9,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":"cloudmoa","namespace":"traefik","metricId":"container_cpu_usage_core_by_workload","entityId":"deploymentList,traefik","type":"workload"}},"visualization":{"showLegend":true}},"x":0,"y":7,"static":true},{"i":"widget3","widget":{"header":"default-header","body":"stat-view","title":"Total Request Per Seconds"},"w":8,"h":7,"minW":6,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":true,"range":false,"clusterId":"cloudmoa","namespace":"","metricId":"traefik_http_requests_rate_last_5m","entityId":"","type":"Traefik","filter":""}},"visualization":{"showGauge":false,"showPercent":false,"min":null,"max":null,"decimals":2,"baseColor":"#409EFF","thresholds":[]}},"x":0,"y":0,"static":true},{"i":"widget4","widget":{"header":"default-header","body":"stat-view","title":"Bad Request Count (10m)"},"w":8,"h":7,"minW":6,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":true,"range":false,"clusterId":"cloudmoa","namespace":"","metricId":"traefik_http_requests_bad_total_last_10m","entityId":"","type":"Traefik","filter":""}},"visualization":{"showGauge":false,"showPercent":false,"min":null,"max":null,"decimals":null,"baseColor":"rgba(255, 0, 0, 1)","thresholds":[]}},"x":32,"y":0,"static":true},{"i":"widget5","widget":{"header":"default-header","body":"stat-view","title":"Avg. Response Duration (10m)"},"w":8,"h":7,"minW":6,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":true,"range":false,"clusterId":"cloudmoa","namespace":"","metricId":"traefik_http_response_time_ms","entityId":"","type":"Traefik","filter":""}},"visualization":{"showGauge":false,"showPercent":false,"min":null,"max":null,"decimals":2,"baseColor":"rgba(64, 158, 255, 1)","thresholds":[]}},"x":40,"y":0,"static":true},{"i":"widget6","widget":{"header":"default-header","body":"stat-view","title":"Total Request Count (10m)"},"w":8,"h":7,"minW":6,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":true,"range":false,"clusterId":"cloudmoa","namespace":"","metricId":"traefik_http_requests_total_last_10m","entityId":"","type":"Traefik","filter":""}},"visualization":{"showGauge":false,"showPercent":false,"min":null,"max":null,"decimals":null,"baseColor":"#409EFF","thresholds":[]}},"x":24,"y":0,"static":true},{"i":"widget7","widget":{"header":"default-header","body":"line-chart-view","title":"Pod Memory Utilization (GiB)"},"w":24,"h":9,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":"cloudmoa","namespace":"traefik","metricId":"container_memory_working_set_bytes_by_workload","entityId":"deploymentList,traefik","type":"workload"}},"visualization":{"showLegend":true}},"x":24,"y":7,"static":true},{"widget":{"header":"default-header","body":"line-chart-view","title":"ENTRYPOINT - Open Connections"},"w":24,"h":9,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":"cloudmoa","namespace":"","metricId":"traefik_entrypoint_open_connections","entityId":"","type":"Traefik","filter":""}},"visualization":{"showLegend":true}},"i":"widget8","static":true,"x":0,"y":26},{"widget":{"header":"default-header","body":"line-chart-view","title":"SERVICE - Open Connections"},"w":24,"h":9,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":"cloudmoa","namespace":"","metricId":"traefik_service_open_connections","entityId":"","type":"Traefik","filter":""}},"visualization":{"showLegend":true}},"i":"widget9","static":true,"x":24,"y":26},{"widget":{"header":"default-header","body":"stack-bar-chart-view","title":"Used Sockets"},"w":24,"h":11,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":"cloudmoa","namespace":"","metricId":"traefik_soket_used","entityId":"","type":"Traefik","filter":""}},"visualization":{"showLegend":true}},"i":"widget10","static":true,"x":0,"y":35},{"widget":{"header":"default-header","body":"stack-bar-chart-view","title":"Access to services / sec"},"w":24,"h":10,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":"cloudmoa","namespace":"","metricId":"traefik_http_requests_rate_by_service","entityId":"","type":"Traefik","filter":""}},"visualization":{"showLegend":true}},"i":"widget11","static":true,"x":0,"y":16},{"widget":{"header":"default-header","body":"stack-bar-chart-view","title":"Access to Entrypoints / sec"},"w":24,"h":10,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":"cloudmoa","namespace":"","metricId":"traefik_http_requests_rate_by_entrypoint","entityId":"","type":"Traefik","filter":""}},"visualization":{"showLegend":true}},"i":"widget12","static":true,"x":24,"y":16},{"widget":{"header":"default-header","body":"horizontal-bar-chart-view","title":"Horizontal Bar Chart"},"w":24,"h":11,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":false,"clusterId":"cloudmoa","namespace":"","metricId":"traefik_status_code_count","entityId":"","type":"Traefik","filter":""}},"visualization":{"showLegend":true}},"i":"widget13","static":true,"x":24,"y":35}]', + 'Traefik', (select id from auth_resource3 where name='dashboard|admin|Traefik'), 'admin', 'admin', NULL, true); +INSERT INTO public.dashboard2 (id, created_date, modified_date, layout, title, auth_resource_id, created_by, modified_by, description, "share") + VALUES(nextval('hibernate_sequence'), '2020-04-28 09:23:14.286', '2020-04-28 09:23:44.213', '[{"i":"widget0","widget":{"header":"default-header","body":"stat-view","title":"Current QPS"},"w":8,"h":8,"minW":6,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":true,"range":false,"clusterId":"cloudmoa","namespace":"","metricId":"mysql_query_per_second","entityId":"","type":"MySQL","filter":""}},"visualization":{"showGauge":false,"showPercent":false,"min":null,"max":null,"decimals":2,"baseColor":"#409EFF","thresholds":[],"showLegend":true}},"x":16,"y":0,"static":true},{"i":"widget1","widget":{"header":"default-header","body":"stat-view","title":"InnoDB Buffer Pool Size (GiB)"},"w":8,"h":8,"minW":6,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":true,"range":false,"clusterId":"cloudmoa","namespace":"","metricId":"mysql_Innodb_buffer_pool_size","entityId":"","type":"MySQL","filter":""}},"visualization":{"showGauge":false,"showPercent":false,"min":null,"max":null,"decimals":2,"baseColor":"#409EFF","thresholds":[],"showLegend":true}},"x":8,"y":0,"static":true},{"i":"widget2","widget":{"header":"default-header","body":"stat-view","title":"Number of Connection Attempts"},"w":8,"h":8,"minW":6,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":true,"range":false,"clusterId":"cloudmoa","namespace":"","metricId":"mysql_global_status_connections","entityId":"","type":"MySQL","filter":""}},"visualization":{"showGauge":false,"showPercent":false,"min":null,"max":null,"decimals":2,"baseColor":"#409EFF","thresholds":[]}},"x":40,"y":0,"static":true},{"i":"widget3","widget":{"header":"default-header","body":"stat-view","title":"Max Connection","description":"Maximum permitted number of simultaneous client connections. By default, this is 151."},"w":8,"h":8,"minW":6,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":true,"range":false,"clusterId":"cloudmoa","namespace":"","metricId":"mysql_global_variables_max_connections","entityId":"","type":"MySQL","filter":""}},"visualization":{"showGauge":false,"showPercent":false,"min":null,"max":null,"decimals":2,"baseColor":"#409EFF","thresholds":[]}},"x":24,"y":0,"static":true},{"i":"widget4","widget":{"header":"default-header","body":"stat-view","title":"Number of Max Used Connection","description":"Maximum number of connections that have been in use simultaneously since the server started."},"w":8,"h":8,"minW":6,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":true,"range":false,"clusterId":"cloudmoa","namespace":"","metricId":"mysql_global_status_max_used_connections","entityId":"","type":"MySQL","filter":""}},"visualization":{"showGauge":false,"showPercent":false,"min":null,"max":null,"decimals":2,"baseColor":"#409EFF","thresholds":[]}},"x":32,"y":0,"static":true},{"i":"widget5","widget":{"header":"default-header","body":"stat-view","title":"Instance Up Count"},"w":8,"h":8,"minW":6,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":true,"range":false,"clusterId":"cloudmoa","namespace":"","metricId":"mysql_up","entityId":"","type":"MySQL","filter":""}},"visualization":{"showGauge":false,"showPercent":false,"min":null,"max":null,"decimals":2,"baseColor":"#409EFF","thresholds":[],"showLegend":true}},"x":0,"y":0,"static":true},{"i":"widget6","widget":{"header":"default-header","body":"line-chart-view","title":"Buffer Cache Hit Ratio"},"w":24,"h":11,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":"cloudmoa","namespace":"","metricId":"mysql_cache_hit_ratio","entityId":"","type":"MySQL","filter":""}},"visualization":{"showLegend":true}},"x":24,"y":19,"static":true},{"i":"widget7","widget":{"header":"default-header","body":"line-chart-view","title":"Disk R/W Bytes"},"w":24,"h":11,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":"cloudmoa","namespace":"","metricId":"mysql_disk_io","entityId":"","type":"MySQL","filter":""}},"visualization":{"showLegend":true}},"x":24,"y":8,"static":true},{"i":"widget8","widget":{"header":"default-header","body":"line-chart-view","title":"Buffer I/O Bytes"},"w":24,"h":11,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":"cloudmoa","namespace":"","metricId":"mysql_buffer_io","entityId":"","type":"MySQL","filter":""}},"visualization":{"showLegend":true}},"x":0,"y":19,"static":true},{"i":"widget9","widget":{"header":"default-header","body":"line-chart-view","title":"Network Recieved / Transmit (KiB)"},"w":24,"h":11,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":"cloudmoa","namespace":"","metricId":"mysql_bytes_received_sent","entityId":"","type":"MySQL","filter":""}},"visualization":{"showLegend":true}},"x":0,"y":8,"static":true},{"i":"widget10","widget":{"header":"default-header","body":"stack-bar-chart-view","title":"Number of Locks"},"w":24,"h":11,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":"cloudmoa","namespace":"","metricId":"mysql_status_locks","entityId":"","type":"MySQL","filter":""}},"visualization":{"showLegend":true}},"x":0,"y":30,"static":true},{"i":"widget11","widget":{"header":"default-header","body":"line-chart-view","title":"MySQL Questions"},"w":24,"h":11,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":"cloudmoa","namespace":"","metricId":"mysql_global_status_questions","entityId":"","type":"MySQL","filter":""}},"visualization":{"showLegend":true}},"x":24,"y":30,"static":true},{"i":"widget12","widget":{"header":"default-header","body":"line-chart-view","title":"Line Chart"},"w":24,"h":11,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":"cloudmoa","namespace":"","metricId":"mysql_threads_total","entityId":"","type":"MySQL","filter":""}},"visualization":{"showLegend":true}},"x":0,"y":41,"static":true},{"widget":{"header":"default-header","body":"horizontal-bar-chart-view","title":"Command Executed"},"w":24,"h":11,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":false,"clusterId":"cloudmoa","namespace":"","metricId":"mysql_global_status_commands_total","entityId":"","type":"MySQL","filter":""}},"visualization":{"showLegend":true}},"i":"widget13","static":true,"x":24,"y":41}]', + 'MySQL / MariaDB', (select id from auth_resource3 where name='dashboard|admin|MySQL / MariaDB'), 'admin', 'admin', NULL, true); +INSERT INTO public.dashboard2 (id, created_date, modified_date, layout, title, auth_resource_id, created_by, modified_by, description, "share") + VALUES(nextval('hibernate_sequence'), '2020-04-28 09:23:14.286', '2020-04-28 09:23:44.213', '[{"i":"widget0","widget":{"header":"default-header","body":"stat-view","title":"Up"},"w":9,"h":9,"minW":6,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":true,"range":false,"clusterId":"cloudmoa","namespace":"","metricId":"nginx_ingress_nginx_up","entityId":"","type":"Nginx-Ingress","filter":""}},"visualization":{"showGauge":false,"showPercent":false,"min":null,"max":null,"decimals":2,"baseColor":"#409EFF","thresholds":[]}},"x":0,"y":0,"static":true},{"i":"widget1","widget":{"header":"default-header","body":"line-chart-view","title":"CPU Usage (%)"},"w":12,"h":9,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":"cloudmoa","namespace":"nginx-ingress","metricId":"container_cpu_usage_core_by_workload","entityId":"deploymentList,nginx-ingress-nginx-ingress","type":"workload"}},"visualization":{"showLegend":true}},"x":0,"y":9,"static":true},{"i":"widget2","widget":{"header":"default-header","body":"line-chart-view","title":"Memory Usage (GiB)"},"w":12,"h":9,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":"cloudmoa","namespace":"nginx-ingress","metricId":"container_memory_usage_by_workload","entityId":"deploymentList,nginx-ingress-nginx-ingress","type":"workload"}},"visualization":{"showLegend":true}},"x":12,"y":9,"static":true},{"i":"widget3","widget":{"header":"default-header","body":"stat-view","title":"Connected Clients Count"},"w":10,"h":9,"minW":6,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":true,"range":false,"clusterId":"cloudmoa","namespace":"","metricId":"nginx_ingress_nginx_connections_active","entityId":"","type":"Nginx-Ingress","filter":""}},"visualization":{"showGauge":false,"showPercent":false,"min":null,"max":null,"decimals":null,"baseColor":"#409EFF","thresholds":[],"showLegend":true}},"x":9,"y":0,"static":true},{"i":"widget4","widget":{"header":"default-header","body":"line-chart-view","title":"Network Transmit (KB)"},"w":12,"h":9,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":"cloudmoa","namespace":"nginx-ingress","metricId":"container_network_transmit_by_workload","entityId":"deploymentList,nginx-ingress-nginx-ingress","type":"workload"}},"visualization":{"showLegend":true}},"x":24,"y":9,"static":true},{"i":"widget5","widget":{"header":"default-header","body":"line-chart-view","title":"Network Recieved (KiB)"},"w":12,"h":9,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":"cloudmoa","namespace":"nginx-ingress","metricId":"container_network_receive_by_workload","entityId":"deploymentList,nginx-ingress-nginx-ingress","type":"workload"}},"visualization":{"showLegend":true}},"x":36,"y":9,"static":true},{"i":"widget6","widget":{"header":"default-header","body":"stat-view","title":"Nginx Ingress last reload status"},"w":10,"h":9,"minW":6,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":true,"range":false,"clusterId":"cloudmoa","namespace":"","metricId":"nginx_ingress_controller_nginx_last_reload_status","entityId":"","type":"Nginx-Ingress","filter":""}},"visualization":{"showGauge":false,"showPercent":false,"min":null,"max":null,"decimals":2,"baseColor":"#409EFF","thresholds":[],"showLegend":true}},"x":19,"y":0,"static":true},{"i":"widget7","widget":{"header":"default-header","body":"stat-view","title":"Nginx Ingress reload success total"},"w":10,"h":9,"minW":6,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":true,"range":false,"clusterId":"cloudmoa","namespace":"","metricId":"nginx_ingress_controller_nginx_reloads_total","entityId":"","type":"Nginx-Ingress","filter":""}},"visualization":{"showGauge":false,"showPercent":false,"min":null,"max":null,"decimals":2,"baseColor":"#409EFF","thresholds":[]}},"x":29,"y":0,"static":true},{"i":"widget8","widget":{"header":"default-header","body":"stat-view","title":"Nginx Ingress reload error total"},"w":9,"h":9,"minW":6,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":true,"range":false,"clusterId":"cloudmoa","namespace":"","metricId":"nginx_ingress_controller_nginx_reload_errors_total","entityId":"","type":"Nginx-Ingress","filter":""}},"visualization":{"showGauge":false,"showPercent":false,"min":null,"max":null,"decimals":2,"baseColor":"#409EFF","thresholds":[]}},"x":39,"y":0,"static":true},{"i":"widget10","widget":{"header":"default-header","body":"line-chart-view","title":"Nginx Ingress Http Request Seconds"},"w":48,"h":15,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":"cloudmoa","namespace":"","metricId":"nginx_ingress_nginx_http_requests_second","entityId":"","type":"Nginx-Ingress","filter":""}},"visualization":{"showLegend":true}},"x":0,"y":18,"static":true}]', + 'Nginx-Ingress', (select id from auth_resource3 where name='dashboard|admin|Nginx-Ingress'), 'admin', 'admin', NULL, true); -INSERT INTO public.dashboard2 (id, created_date, modified_date, layout, title, auth_resource_id, created_by, modified_by, description, "share") VALUES(nextval('hibernate_sequence'), '2020-04-28 09:23:14.286', '2020-04-28 09:23:44.213', '[{"i":"widget0","widget":{"header":"default-header","body":"event-view"},"w":48,"h":2,"minW":2,"minH":1,"maxW":48,"maxH":36,"component":{"params":{"targets":["widget1","widget2","widget3","widget4","widget5","widget6","widget7","widget8"],"action":"changeFilter","options":{"clusterId":{"mod":true,"value":"cloudmoa"},"namespace":{"mod":false,"value":null},"entity":{"mod":true,"type":["node"],"value":["exem-master","exem-node001","exem-node002"]}}},"visualization":{"type":"select"}},"x":0,"y":0},{"i":"widget1","widget":{"header":"default-header","body":"line-chart-view","title":"CPU Usage"},"w":18,"h":11,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":"cloudmoa","metricId":"node_disk_read_latency","entityId":[],"type":"node","namespace":"default"}},"visualization":{"showLegend":true}},"x":0,"y":2},{"i":"widget2","widget":{"header":"default-header","body":"horizontal-bar-chart-view","title":"Memory Usage"},"w":18,"h":11,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":false,"clusterId":"cloudmoa","metricId":"node_memory_usage","entityId":[],"type":"node"}},"visualization":{"showLegend":true}},"x":0,"y":13},{"i":"widget3","widget":{"header":"default-header","body":"line-chart-view","title":"Network Transmit (KiB)"},"w":15,"h":11,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":"cloudmoa","metricId":"node_network_transmit","entityId":[],"type":"node","namespace":"default"}},"visualization":{"showLegend":true}},"x":18,"y":2},{"i":"widget4","widget":{"header":"default-header","body":"line-chart-view","title":"Network Receive (KiB)"},"w":15,"h":11,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":"cloudmoa","metricId":"node_network_receive","entityId":[],"type":"node","namespace":"default"}},"visualization":{"showLegend":true}},"x":33,"y":2},{"i":"widget5","widget":{"header":"default-header","body":"stack-bar-chart-view","title":"Pod Running Count"},"w":30,"h":12,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":"cloudmoa","metricId":"node_pod_running_count","entityId":[],"type":"node","namespace":"default"}},"visualization":{"showLegend":true}},"x":18,"y":24},{"i":"widget6","widget":{"header":"default-header","body":"stack-bar-chart-view","title":"Disk Read Latency (ms)"},"w":15,"h":11,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":"cloudmoa","metricId":"node_disk_read_latency","entityId":[],"type":"node","namespace":"default"}},"visualization":{"showLegend":true}},"x":18,"y":13},{"i":"widget7","widget":{"header":"default-header","body":"stack-bar-chart-view","title":"Disk Write Latency (ms)"},"w":15,"h":11,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":"cloudmoa","metricId":"node_disk_write_latency","entityId":[],"type":"node","namespace":"default"}},"visualization":{"showLegend":true}},"x":33,"y":13},{"i":"widget8","widget":{"header":"default-header","body":"stack-bar-chart-view","title":"Filesystem Usage (%)"},"w":18,"h":12,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":"cloudmoa","metricId":"node_filesystem_usage","entityId":[],"type":"node","namespace":"default"}},"visualization":{"showLegend":true}},"x":0,"y":24}]', 'CloudMOA - Nodes Resource', -(select id from auth_resource3 where name='dashboard|admin|CloudMOA - Nodes Resource'), 'admin', 'admin', NULL, true); -INSERT INTO public.dashboard2 (id, created_date, modified_date, layout, title, auth_resource_id, created_by, modified_by, description, "share") VALUES(nextval('hibernate_sequence'), '2020-04-28 09:23:14.286', '2020-04-28 09:23:44.213', '[{"i":"widget0","widget":{"header":"default-header","body":"service-tps-view","title":"Service TPS"},"w":24,"h":7,"minW":12,"minH":6,"maxW":48,"maxH":16,"component":{"api":{"uri":"metric.chart","params":{"clusterId":null,"namespace":null,"entityId":null,"type":"service","range":false}}},"x":0,"y":2},{"i":"widget1","widget":{"header":"default-header","body":"event-view"},"w":48,"h":2,"minW":2,"minH":2,"maxW":48,"maxH":36,"component":{"params":{"targets":["widget0","widget2","widget3","widget4","widget5","widget6","widget7","widget8"],"action":"changeFilter","options":{"clusterId":{"mod":true,"value":null},"namespace":{"mod":true,"value":null},"entity":{"mod":true,"type":["service"],"value":[]}}},"visualization":{"type":"select"}},"viewStyle":{"backgroundColor":"#252525"},"x":0,"y":0},{"i":"widget2","widget":{"header":"default-header","body":"service-treeMap-view"},"w":24,"h":21,"minW":20,"minH":10,"maxW":48,"maxH":48,"component":{"api":{"uri":"metric.chart","params":{"clusterId":null,"namespace":null,"entityId":null,"type":"service","range":false}}},"x":24,"y":2},{"i":"widget3","widget":{"header":"default-header","body":"stack-bar-chart-view","title":"Service Request Count"},"w":12,"h":7,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":null,"namespace":null,"metricId":"imxc_service_http_requests_per_sec","entityId":"","type":null}},"visualization":{"showLegend":true}},"x":0,"y":9},{"i":"widget4","widget":{"header":"default-header","body":"stack-bar-chart-view","title":"Service Total Error Count"},"w":12,"h":7,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":null,"namespace":null,"metricId":"imxc_service_errors_count","entityId":"","type":null}},"visualization":{"showLegend":true}},"x":0,"y":16},{"i":"widget5","widget":{"header":"default-header","body":"scatter-chart-view","bodyClass":["drag-ignore"],"title":"Xview","headerClass":["drag-handle"]},"w":24,"h":13,"minW":20,"minH":12,"maxW":68,"maxH":60,"component":{"api":{"params":{}}},"x":0,"y":23},{"i":"widget6","widget":{"header":"default-header","body":"event-list-view","title":"Event List"},"w":24,"h":13,"minW":24,"minH":12,"maxW":48,"maxH":36,"component":{"api":{"params":{"clusterId":null}}},"x":24,"y":23},{"i":"widget7","widget":{"header":"default-header","body":"line-chart-view","title":"Service Latency"},"w":12,"h":7,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":null,"namespace":null,"metricId":"imxc_service_http_requests_time_avg","entityId":"","type":null}},"visualization":{"showLegend":true}},"x":12,"y":9},{"i":"widget8","widget":{"header":"default-header","body":"stack-bar-chart-view","title":"Service Total Transaction Count"},"w":12,"h":7,"minW":8,"minH":4,"maxW":48,"maxH":18,"component":{"api":{"uri":"metric.chart","params":{"unique":false,"range":true,"clusterId":null,"namespace":null,"metricId":"imxc_service_http_requests_per_sec_by_api","entityId":"","type":null}},"visualization":{"showLegend":true}},"x":12,"y":16}]', 'Service Detail', -(select id from auth_resource3 where name='dashboard|admin|Service Detail'), 'admin', 'admin', NULL, true); INSERT INTO public.common_setting (code_id, code_value, code_desc, code_auth, code_group, created_date, modified_date) VALUES ('normal_score', '20', null, null, 'anomaly', '2020-07-07 18:15:55.000000', '2020-07-07 18:15:53.000000'); INSERT INTO public.common_setting (code_id, code_value, code_desc, code_auth, code_group, created_date, modified_date) VALUES ('attention_score', '60', null, null, 'anomaly', '2020-07-07 09:18:04.968765', '2020-07-07 09:18:04.968765'); @@ -2385,3 +2407,66 @@ INSERT INTO jspd_prop values('TXN_SEND_LIMIT', '15000', 'Txninfo maximum number INSERT INTO jspd_prop values('MTD_SEND_LIMIT', '15000', 'Txnmethod maximum number of transfers', 'integer', 'input', '', true, now(), now()); INSERT INTO jspd_prop values('SQL_SEND_LIMIT', '15000', 'Txnsql maximum number of transfers', 'integer', 'input', '', true, now(), now()); INSERT INTO jspd_prop values('ETOE_SEND_LIMIT', '15000', 'E2einfo maximum number of transfers', 'integer', 'input', '', true, now(), now()); + + + +-- CLOUD-13633; 대시보드 관련 패치 +-- Traefik 대시보드 지원 관련 metric meta 추가 +-- Auto-generated SQL script #202303161740 +INSERT INTO public.metric_meta2 (id,meta_name,description,expr,resource_type,entity_type,groupby_keys,in_use,message) + VALUES ('traefik_uptime','Traefik Uptime','Traefik Process Uptime','time() - process_start_time_seconds{job="cmoa-traefik"}','Instance','Traefik','xm_clst_id, xm_namespace, xm_pod_id',true,'None'); +INSERT INTO public.metric_meta2 (id,meta_name,description,expr,resource_type,entity_type,groupby_keys,in_use,message) + VALUES ('traefik_soket_used','Traefik Socket Used','Number of sockets Traefik is using','process_open_fds{job=~"cmoa-traefik"}','Instance','Traefik','xm_clst_id, xm_namespace, xm_pod_id',true,'None'); +INSERT INTO public.metric_meta2 (id,meta_name,description,expr,resource_type,entity_type,in_use,message) + VALUES ('traefik_http_requests_rate_last_5m','Traefik HTTP Requests Rate','Number of http requests per second received by Traefik within 5 minutes','sum(rate(traefik_service_requests_total[5m]))','Request','Traefik',true,'CLST:{{$labels.xm_clst_id}} NS:{{$labels.xm_namespace}} POD:{{$labels.xm_pod_id}} Trafik HTTP Request Rate :{{humanize $value}}|{threshold}.'); +INSERT INTO public.metric_meta2 (id,meta_name,description,expr,resource_type,entity_type,in_use,message) + VALUES ('traefik_http_requests_rate_by_service','Traefik HTTP Requets Rate by Service','Number of http requests per second grouped by service within 5 minutes','sum(rate(traefik_service_requests_total[5m])) by (service)','Request','Traefik',true,'CLST:{{$labels.xm_clst_id}} NS:{{$labels.xm_namespace}} POD:{{$labels.xm_pod_id}} Trafik HTTP Request Rate :{{humanize $value}}|{threshold}.'); +INSERT INTO public.metric_meta2 (id,meta_name,description,expr,resource_type,entity_type,in_use,message) + VALUES ('traefik_http_requests_rate_by_entrypoint','Traefik HTTP Requets Rate by Entrypoint','Number of http requests per second grouped by entrypoint within 5 minutes','sum(rate(traefik_entrypoint_requests_total[5m])) by (entrypoint)','Request','Traefik',true,'None'); +INSERT INTO public.metric_meta2 (id,meta_name,description,expr,resource_type,entity_type,groupby_keys,in_use,message) + VALUES ('traefik_4xx_error_rate_last_5m','Traefik 4xx Error Rate','4xx error requests per second rate within 5 minutes','sum(rate(traefik_service_requests_total{code=~"4[0-9]{2}"}[5m]))','Request','Traefik','xm_clst_id, xm_namespace, xm_pod_id',true,'CLST:{{$labels.xm_clst_id}} NS:{{$labels.xm_namespace}} POD:{{$labels.xm_pod_id}} Trafik 4xx Error Rate :{{humanize $value}}|{threshold}.'); +INSERT INTO public.metric_meta2 (id,meta_name,description,expr,resource_type,entity_type,groupby_keys,in_use,message) + VALUES ('traefik_5xx_error_rate_last_5m','Traefik 5xx Error Rate','5xx error requests per second rate within 5 minutes','sum(rate(traefik_service_requests_total{code=~"5[0-9]{2}"}[5m]))','Request','Traefik','xm_clst_id, xm_namespace, xm_pod_id',true,'CLST:{{$labels.xm_clst_id}} NS:{{$labels.xm_namespace}} POD:{{$labels.xm_pod_id}} Trafik 5xx Error Rate :{{humanize $value}}|{threshold}.'); +INSERT INTO public.metric_meta2 (id,meta_name,description,expr,resource_type,entity_type,groupby_keys,in_use,message) + VALUES ('traefik_http_requests_4xx_total_last_10m','Traefik HTTP Requests 4xx Total Last 10m','Number of 4xx error requests in 10 minutes','sum(increase(traefik_service_requests_total{code=~"4[0-9]{2}"}[10m]))','Request','Traefik','xm_clst_id, xm_namespace, xm_pod_id',true,'None'); +INSERT INTO public.metric_meta2 (id,meta_name,description,expr,resource_type,entity_type,groupby_keys,in_use,message) + VALUES ('traefik_http_requests_5xx_total_last_10m','Traefik HTTP Requests 5xx Total Last 10m','Number of 5xx error requests in 10 minutes','sum(increase(traefik_service_requests_total{code=~"5[0-9]{2}"}[10m]))','Request','Traefik','xm_clst_id, xm_namespace, xm_pod_id',true,'None'); +INSERT INTO public.metric_meta2 (id,meta_name,description,expr,resource_type,entity_type,groupby_keys,in_use,message) + VALUES ('traefik_http_requests_4xx_total_last_1h','Traefik HTTP Requests 4xx Total Last 1h','Number of 4xx error requests in 1 hour','sum(increase(traefik_service_requests_total{code=~"4[0-9]{2}"}[1h]))','Request','Traefik','xm_clst_id, xm_namespace, xm_pod_id',true,'None'); +INSERT INTO public.metric_meta2 (id,meta_name,description,expr,resource_type,entity_type,groupby_keys,in_use,message) + VALUES ('traefik_http_requests_5xx_total_last_1h','Traefik HTTP Requests 4xx Total Last 1h','Number of 5xx error requests in 1 hour','sum(increase(traefik_service_requests_total{code=~"5[0-9]{2}"}[1h]))','Request','Traefik','xm_clst_id, xm_namespace, xm_pod_id',true,'None'); +INSERT INTO public.metric_meta2 (id,meta_name,description,expr,resource_type,entity_type,in_use,message) + VALUES ('traefik_http_response_time_ms','Traefik HTTP Response Time Milisecond','Traefik HTTP Response Time (ms)','sum(increase(traefik_service_request_duration_seconds_sum[5m])) / sum(increase(traefik_entrypoint_requests_total[5m])) * 1000','Response','Traefik',true,'None'); +INSERT INTO public.metric_meta2 (id,meta_name,description,expr,resource_type,entity_type,in_use,message) + VALUES ('traefik_entrypoint_open_connections','Traefik Entrypoint Open Connections','The current count of open connections on an entrypoint','sum(traefik_entrypoint_open_connections) by (method)','Entrypoint','Traefik',true,'None'); +INSERT INTO public.metric_meta2 (id,meta_name,description,expr,resource_type,entity_type,in_use,message) + VALUES ('traefik_service_open_connections','Traefik Service Open Connections','The current count of open connections on an service','sum(traefik_service_open_connections) by (method)','Service','Traefik',true,'None'); +INSERT INTO public.metric_meta2 (id,meta_name,description,expr,resource_type,entity_type,groupby_keys,in_use,message) + VALUES ('traefik_http_requests_total_last_10m','Traefik HTTP Requests Total Last 10m','Number requests in 10 minutes','sum(increase(traefik_service_requests_total{}[10m]))','Request','Traefik','xm_clst_id, xm_namespace, xm_pod_id',true,'CLST:{{$labels.xm_clst_id}} NS:{{$labels.xm_namespace}} POD:{{$labels.xm_pod_id}} Trafik Request Count (10m) :{{humanize $value}}|{threshold}.'); +INSERT INTO public.metric_meta2 (id,meta_name,description,expr,resource_type,entity_type,groupby_keys,in_use,message) + VALUES ('traefik_http_requests_total_last_1h','Traefik HTTP Requests Total Last 1h','Number requests in 1 hour','sum(increase(traefik_service_requests_total{}[1h]))','Request','Traefik','xm_clst_id, xm_namespace, xm_pod_id',true,'CLST:{{$labels.xm_clst_id}} NS:{{$labels.xm_namespace}} POD:{{$labels.xm_pod_id}} Trafik Request Count (1h) :{{humanize $value}}|{threshold}.'); + +-- MySQL-MariaDB 대시보드 지원 관련 metric meta 추가 +-- Auto-generated SQL script #202303201205 +INSERT INTO public.metric_meta2 (id,meta_name,description,expr,resource_type,entity_type,groupby_keys,in_use,anomaly_score,message) + VALUES ('mysql_query_per_second','Query Per Second','Based on the queries reported by MySQL''s SHOW STATUS command, it is the number of statements executed by the server within the last second.','irate(mysql_global_status_queries{}[5m])','Query','MySQL','instance',true,true,'CLST:{{$labels.xm_clst_id}} NS:{{$labels.xm_namespace}} MySQL QPS :{{humanize $value}}%|{threshold}%.'); +INSERT INTO public.metric_meta2 (id,meta_name,description,expr,resource_type,entity_type,groupby_keys,in_use,message) + VALUES ('mysql_Innodb_buffer_pool_size','InnoDB Buffer Pool Size in GiB','Describes a storage area called the buffer pool for caching data and indexes in memory.','mysql_global_variables_innodb_buffer_pool_size / 1024 / 1024 / 1024','InnoDB','MySQL','instance',true,'None'); +INSERT INTO public.metric_meta2 (id,meta_name,description,expr,resource_type,entity_type,groupby_keys,in_use,message) + VALUES ('mysql_Innodb_buffer_pool_size_gib_with_limit','InnoDB Buffer Pool Size with Limit','Describes a storage area called the buffer pool for caching data and indexes in memory.','(mysql_global_variables_innodb_buffer_pool_size{} * 100) / on (xm_pod_id,xm_cont_name) imxc_kubernetes_container_resource_limit_memory{xm_pod_id!~"|POD", pod_state="Running"}','InnoDB','MySQL','instance',true,'None'); +INSERT INTO public.metric_meta2 (id,meta_name,description,expr,resource_type,entity_type,groupby_keys,in_use,message) + VALUES ('mysql_global_status_questions','MySQL Questions','The number of statements executed by the server.','rate(mysql_global_status_questions{}[5m])','Query','MySQL','instance',true,'None'); +INSERT INTO public.metric_meta2 (id,meta_name,description,expr,resource_type,entity_type,groupby_keys,in_use,message) + VALUES ('mysql_global_status_max_used_connections','Max Used Connections','Maximum number of connections that have been in use simultaneously since the server started.','mysql_global_status_max_used_connections','Connection','MySQL','instance',true,'None'); +INSERT INTO public.metric_meta2 (id,meta_name,description,expr,resource_type,entity_type,groupby_keys,in_use,message) + VALUES ('mysql_global_variables_max_connections','Max Connections','Maximum permitted number of simultaneous client connections. By default, this is 151.','mysql_global_variables_max_connections','Connection','MySQL','instance',true,'None'); + +-- Nginx Ingress 대시보드 지원 관련 metric meta 추가 +INSERT INTO public.metric_meta2 (id,meta_name,description,expr,resource_type,entity_type,groupby_keys,in_use,message) VALUES('nginx_ingress_nginx_up','Nginx Ingress Up','Nginx Ingress Up','sum by (xm_clst_id, xm_namespace, xm_node_id, instance, class) (nginx_ingress_nginx_up)','Pod','Nginx-Ingress','',true,false,'None'); +INSERT INTO public.metric_meta2 (id,meta_name,description,expr,resource_type,entity_type,groupby_keys,in_use,message) VALUES('nginx_ingress_nginx_connections_active','Nginx Ingress Connection Active','Nginx Ingress Client Connection Active','sum by (xm_clst_id, xm_namespace, xm_node_id, instance, class) (nginx_ingress_nginx_connections_active)','Connection','Nginx-Ingress','',true,false,'None'); +INSERT INTO public.metric_meta2 (id,meta_name,description,expr,resource_type,entity_type,groupby_keys,in_use,message) VALUES('nginx_ingress_controller_nginx_last_reload_status','Nginx Ingress last reload status','Status of the last NGINX reload','sum by (xm_clst_id, xm_namespace, xm_node_id, instance, class) (nginx_ingress_controller_nginx_reload_errors_total)','Config','Nginx-Ingress','',true,false,'None'); +INSERT INTO public.metric_meta2 (id,meta_name,description,expr,resource_type,entity_type,groupby_keys,in_use,message) VALUES('nginx_ingress_controller_nginx_reload_errors_total','Nginx Ingress reload error total','Number of unsuccessful NGINX reloads','sum by (xm_clst_id, xm_namespace, xm_node_id, instance, class) (nginx_ingress_controller_nginx_reload_errors_total)','Config','Nginx-Ingress','',true,false,'None'); +INSERT INTO public.metric_meta2 (id,meta_name,description,expr,resource_type,entity_type,groupby_keys,in_use,message) VALUES('nginx_ingress_controller_nginx_reloads_total','Nginx Ingress reload success total','Number of successful NGINX reloads','sum by (xm_clst_id, xm_namespace, xm_node_id, instance, class) (nginx_ingress_controller_nginx_reloads_total)','Config','Nginx-Ingress','',true,false,'None'); +INSERT INTO public.metric_meta2 (id,meta_name,description,expr,resource_type,entity_type,groupby_keys,in_use,message) VALUES('nginx_ingress_nginx_http_requests_total','Nginx Ingress Http Request Total','Total http requests','sum by (xm_clst_id, xm_namespace, xm_node_id, instance, class) (nginx_ingress_nginx_http_requests_total)','Request','Nginx-Ingress','',true,false,'None'); +INSERT INTO public.metric_meta2 (id,meta_name,description,expr,resource_type,entity_type,groupby_keys,in_use,message) VALUES('nginx_ingress_nginx_http_requests_second','Nginx Ingress Http Request Seconds','Http request per second','sum by (xm_clst_id, xm_namespace, xm_node_id, instance, class) (rate(nginx_ingress_nginx_http_requests_total[1m]))','Request','Nginx-Ingress','',true,false,'None'); + diff --git a/roles/cmoa_install/files/06-imxc-ui/imxc-ui-jaeger/cmoa-manual.yaml b/roles/cmoa_install/files/06-imxc-ui/imxc-ui-jaeger/cmoa-manual.yaml deleted file mode 100644 index e94fc14..0000000 --- a/roles/cmoa_install/files/06-imxc-ui/imxc-ui-jaeger/cmoa-manual.yaml +++ /dev/null @@ -1,36 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: manual - namespace: imxc -spec: - selector: - matchLabels: - app: manual - replicas: 1 - template: - metadata: - labels: - app: manual - spec: - containers: - - name: manual - image: {{ .Values.global.IMXC_IN_REGISTRY }}/manual:{{ .Values.global.CMOA_MANUAL_VERSION }} - imagePullPolicy: IfNotPresent - ---- -apiVersion: v1 -kind: Service -metadata: - name: manual - namespace: imxc -spec: - type: NodePort - selector: - app: manual - ports: - - protocol: TCP - port: 8088 - targetPort: 3000 - nodePort: {{ .Values.global.CMOA_MANUAL_PORT }} - diff --git a/roles/cmoa_install/files/06-imxc-ui/imxc-ui-jaeger/templates/imxc-ui-config-jaeger.yaml b/roles/cmoa_install/files/06-imxc-ui/imxc-ui-jaeger/templates/imxc-ui-config-jaeger.yaml deleted file mode 100644 index 9fa97ed..0000000 --- a/roles/cmoa_install/files/06-imxc-ui/imxc-ui-jaeger/templates/imxc-ui-config-jaeger.yaml +++ /dev/null @@ -1,75 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: imxc-ui-config-jaeger - namespace: imxc -data: - properties.file: | - api.url = {{ .Values.global.SERVELET_URL_PROTOCOL }}://{{ .Values.global.ZUUL_SERVER_IP }}:{{ .Values.global.ZUUL_SERVER_PORT }} - config.js: | - window.appEnv = { - // Env Settings servletURL - offlineAccess: "{{ .Values.global.OFFLINEACCESS }}", - backLogin: "{{ .Values.global.BACKLOGIN }}", - servletURL: "{{ .Values.global.SERVELET_URL_PROTOCOL }}://{{ .Values.global.ZUUL_SERVER_IP }}:{{ .Values.global.ZUUL_SERVER_PORT }}", - demoServletURL: "{{ .Values.global.DEMO_SERVELET_URL_PROTOCOL }}://{{ .Values.global.ZUUL_SERVER_IP }}:{{ .Values.global.ZUUL_SERVER_PORT }}", - // Env Settings socketURL - socketURL: "http://{{ .Values.global.NOTI_SERVER_IP }}:{{ .Values.global.NOTI_SERVER_PORT }}/ui-server-websocket", - manualURL: "http://{{ .Values.global.CMOA_MANUAL_SERVER_IP }}:{{ .Values.global.CMOA_MANUAL_PORT }}", - // Env Settings interMaxURL - interMaxURL: "http://{{ .Values.global.INTERMAX_IP }}:8080/intermax/?", - // Env Settings CloudMOA Version - version: '{{ .Values.global.CLOUDMOA_UI_VERSION }}', - UI_build_ver: '{{ .Values.global.UI_SERVER_VERSION }}', - maxSelectionSize: 30, - loginType: 'keycloak', - keyCloak: { - "realm": "{{ .Values.global.KEYCLOAK_REALM }}", - "auth-server-url": "{{ .Values.global.KEYCLOAK_AUTH_SERVER_URL }}", - "ssl-required": "none", - "resource": "{{ .Values.global.KEYCLOAK_RESOURCE }}", - "public-client": true, - "confidential-port": 0 - }, - healthIndicatorStateInfo: [ - { - state: "critical", - // max: 1.0, - // over: 0.8, - max: 100, - over: 80, - text: "Critical", - color: "#ff4040", - level: 4, - }, { - state: "warning", - // max: 0.8, - // over: 0.5, - max: 80, - over: 50, - text: "Warning", - color: "#ffa733", - level: 3, - }, { - state: "attention", - // max: 0.5, - // over: 0.0, - max: 50, - over: 0, - text: "Attention", - // color: "#B4B83D", - color: "#1cbe85", - level: 2, - }, { - state: "normal", - max: 0, - over: 0, - text: "Normal", - // color: "#64B87D", - color: "#24b0ed", - level: 1, - }, - ] - }; - - diff --git a/roles/cmoa_install/files/06-imxc-ui/imxc-ui-jaeger/templates/imxc-ui-server-jaeger.yaml b/roles/cmoa_install/files/06-imxc-ui/imxc-ui-jaeger/templates/imxc-ui-server-jaeger.yaml deleted file mode 100644 index a0d959f..0000000 --- a/roles/cmoa_install/files/06-imxc-ui/imxc-ui-jaeger/templates/imxc-ui-server-jaeger.yaml +++ /dev/null @@ -1,63 +0,0 @@ ---- -kind: Service -apiVersion: v1 -metadata: - name: imxc-ui-service-jaeger - namespace: imxc -spec: - type: NodePort - selector: - app: imxc-ui-jaeger - ports: - - protocol: TCP - name: ui - port: 80 - targetPort: 9999 - nodePort: 31084 ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: imxc-ui-jaeger - namespace: imxc - labels: - app: imxc-ui -spec: - revisionHistoryLimit: 0 - replicas: 1 - selector: - matchLabels: - app: imxc-ui-jaeger - template: - metadata: - labels: - app: imxc-ui-jaeger - spec: - containers: - - name: imxc-ui-jaeger - image: {{ .Values.global.IMXC_IN_REGISTRY }}/ui-server:{{ .Values.global.UI_SERVER_VERSION }} - resources: - requests: - cpu: 100m - memory: 50Mi - limits: - cpu: 200m - memory: 100Mi - imagePullPolicy: IfNotPresent - ports: - - containerPort: 80 - volumeMounts: - - name: config-profile - mountPath: /usr/src/app/web/env - - name: config-server - mountPath: /usr/src/app/config - volumes: - - name: config-profile - configMap: - name: imxc-ui-config-jaeger - items: - - key: "config.js" - path: "config.js" - - name: config-server - configMap: - name: imxc-ui-config-jaeger diff --git a/roles/cmoa_install/files/06-imxc-ui/imxc-ui-jaeger/values.yaml b/roles/cmoa_install/files/06-imxc-ui/imxc-ui-jaeger/values.yaml deleted file mode 100644 index bd63730..0000000 --- a/roles/cmoa_install/files/06-imxc-ui/imxc-ui-jaeger/values.yaml +++ /dev/null @@ -1,94 +0,0 @@ -# Default values for imxc. -# This is a YAML-formatted file. -# Declare variables to be passed into your templates. - -replicaCount: 1 - -image: - repository: 10.10.31.243:5000/cmoa3/nginx - tag: stable - pullPolicy: IfNotPresent - -imagePullSecrets: [] -nameOverride: "" -fullnameOverride: "" - -serviceAccount: - # Specifies whether a service account should be created - create: true - # The name of the service account to use. - # If not set and create is true, a name is generated using the fullname template - name: - -podSecurityContext: {} - # fsGroup: 2000 - -securityContext: {} - # capabilities: - # drop: - # - ALL - # readOnlyRootFilesystem: true - # runAsNonRoot: true - # runAsUser: 1000 - -service: - type: ClusterIP - port: 80 - -ingress: - enabled: false - annotations: {} - # kubernetes.io/ingress.class: nginx - # kubernetes.io/tls-acme: "true" - hosts: - - host: chart-example.local - paths: [] - - tls: [] - # - secretName: chart-example-tls - # hosts: - # - chart-example.local - -resources: {} - # We usually recommend not to specify default resources and to leave this as a conscious - # choice for the user. This also increases chances charts run on environments with little - # resources, such as Minikube. If you do want to specify resources, uncomment the following - # lines, adjust them as necessary, and remove the curly braces after 'resources:'. - # limits: - # cpu: 100m - # memory: 128Mi - # requests: - # cpu: 100m - # memory: 128Mi - -nodeSelector: {} - -tolerations: [] - -affinity: {} - -global: - INTERMAX_IP: - SERVELET_URL_PROTOCOL : http - DEMO_SERVELET_URL_PROTOCOL : http - KEYCLOAK_AUTH_SERVER_URL: http://111.111.111.111:31082/auth - KEYCLOAK_RESOURCE: authorization_server - KEYCLOAK_REALM: exem - - IMXC_IN_REGISTRY: 10.10.31.243:5000/cmoa3 - - ZUUL_SERVER_IP: 111.111.111.111 - ZUUL_SERVER_PORT: 31081 - - NOTI_SERVER_IP: 111.111.111.111 - NOTI_SERVER_PORT: 31083 - - CMOA_MANUAL_SERVER_IP: 111.111.111.111 - CMOA_MANUAL_PORT: 31090 - - OFFLINEACCESS: false - BACKLOGIN: false - - CLOUDMOA_VERSION: rel0.0.0 - UI_SERVER_VERSION: rel0.0.0 - CMOA_MANUAL_VERSION: rel0.0.0 diff --git a/roles/cmoa_install/files/06-imxc-ui/imxc-ui-jspd/Chart.yaml b/roles/cmoa_install/files/06-imxc-ui/imxc-ui-jspd/Chart.yaml deleted file mode 100644 index e2f559f..0000000 --- a/roles/cmoa_install/files/06-imxc-ui/imxc-ui-jspd/Chart.yaml +++ /dev/null @@ -1,5 +0,0 @@ -apiVersion: v1 -appVersion: "1.0" -description: A Helm chart for Kubernetes -name: imxc -version: 0.1.0 diff --git a/roles/cmoa_install/files/06-imxc-ui/imxc-ui-jspd/scripts/init-api-server.sh b/roles/cmoa_install/files/06-imxc-ui/imxc-ui-jspd/scripts/init-api-server.sh deleted file mode 100644 index 45b8f1e..0000000 --- a/roles/cmoa_install/files/06-imxc-ui/imxc-ui-jspd/scripts/init-api-server.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh - -STATUS_CODE="$(curl -s -o /dev/null -w '%{http_code}' http://imxc-keycloak-http/auth/realms/exem)" - -if [ $STATUS_CODE -eq 200 ]; then - JWT_KEY="$(curl -s -XGET http://imxc-keycloak-http/auth/realms/exem | jq -r '.public_key')" - export JWT_KEY - - chmod -R 777 /home/cloudmoa/notification/cloudmoa_alert.log - - java -Djava.security.egd=file:/dev/./urandom -jar /app.jar -elif [ $STATUS_CODE -eq 404 ]; then - echo "not found exem relam. check realm in imxc-keycloak" -else - echo "not found keycloak. check to install keycloak" -fi \ No newline at end of file diff --git a/roles/cmoa_install/files/06-imxc-ui/imxc-ui-jspd/scripts/init-auth-server.sh b/roles/cmoa_install/files/06-imxc-ui/imxc-ui-jspd/scripts/init-auth-server.sh deleted file mode 100644 index 279b8a5..0000000 --- a/roles/cmoa_install/files/06-imxc-ui/imxc-ui-jspd/scripts/init-auth-server.sh +++ /dev/null @@ -1,36 +0,0 @@ -#! /bin/bash - -# 200 -> 서버 및 realm이 있는 경우 -# 404 -> 서버는 있으나 realm이 없는 경우 -# 000 -> 서버가 없음 -STATUS_CODE="$(curl -s -o /dev/null -w '%{http_code}' http://imxc-keycloak-http/auth/realms/exem)" - -if [ $STATUS_CODE -eq 404 ]; then - TOKEN="$(curl -s -d "client_id=admin-cli" -d "username=admin" -d "password=admin" -d "grant_type=password" http://imxc-keycloak-http/auth/realms/master/protocol/openid-connect/token | jq -r '.access_token')" - - echo $TOKEN - - echo "create realm and client" - # create realm and client - curl -s -v POST -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" -d "@/tmp/init.json" http://imxc-keycloak-http/auth/admin/realms - - - echo "create admin and owner" - # create admin and owner - curl -s -v POST -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" -d '{"firstName":"","lastName":"", "username":"admin","email":"admin@example.com", "enabled":"true","credentials":[{"type":"password","value":"admin","temporary":false}]}' http://imxc-keycloak-http/auth/admin/realms/exem/users - curl -s -v POST -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" -d '{"firstName":"","lastName":"", "username":"owner","email":"owner@example.com", "enabled":"true","credentials":[{"type":"password","value":"admin","temporary":false}]}' http://imxc-keycloak-http/auth/admin/realms/exem/users - - JWT_KEY="$(curl -s -XGET http://imxc-keycloak-http/auth/realms/exem | jq -r '.public_key')" - export JWT_KEY - - java -Djava.security.egd=file:/dev/./urandom -jar /app.jar -elif [ $STATUS_CODE -eq 200 ]; then - echo "exist exem relam" - - JWT_KEY="$(curl -s -XGET http://imxc-keycloak-http/auth/realms/exem | jq -r '.public_key')" - export JWT_KEY - - java -Djava.security.egd=file:/dev/./urandom -jar /app.jar -else - echo "not found keycloak. check to install keycloak" -fi diff --git a/roles/cmoa_install/files/06-imxc-ui/imxc-ui-jspd/scripts/init-noti-server.sh b/roles/cmoa_install/files/06-imxc-ui/imxc-ui-jspd/scripts/init-noti-server.sh deleted file mode 100644 index af73aed..0000000 --- a/roles/cmoa_install/files/06-imxc-ui/imxc-ui-jspd/scripts/init-noti-server.sh +++ /dev/null @@ -1,14 +0,0 @@ -#! /bin/sh - -STATUS_CODE="$(curl -s -o /dev/null -w '%{http_code}' http://imxc-keycloak-http/auth/realms/exem)" - -if [ $STATUS_CODE -eq 200 ]; then - JWT_KEY="$(curl -s -XGET http://imxc-keycloak-http/auth/realms/exem | jq -r '.public_key')" - export JWT_KEY - - java -Djava.security.egd=file:/dev/./urandom -jar /app.jar -elif [ $STATUS_CODE -eq 404 ]; then - echo "not found exem relam. check realm in imxc-keycloak" -else - echo "not found keycloak. check to install keycloak" -fi \ No newline at end of file diff --git a/roles/cmoa_install/files/06-imxc-ui/imxc-ui-jspd/scripts/init-resource.sh b/roles/cmoa_install/files/06-imxc-ui/imxc-ui-jspd/scripts/init-resource.sh deleted file mode 100644 index 58db392..0000000 --- a/roles/cmoa_install/files/06-imxc-ui/imxc-ui-jspd/scripts/init-resource.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh - -chmod -R 777 /scripts - -sed -i "s/localhost/$REDIRECT_URLS/g" /scripts/init.json -cp /scripts/init.json /tmp/init.json \ No newline at end of file diff --git a/roles/cmoa_install/files/06-imxc-ui/imxc-ui-jspd/scripts/init.json b/roles/cmoa_install/files/06-imxc-ui/imxc-ui-jspd/scripts/init.json deleted file mode 100644 index dcd68b4..0000000 --- a/roles/cmoa_install/files/06-imxc-ui/imxc-ui-jspd/scripts/init.json +++ /dev/null @@ -1,2148 +0,0 @@ -{ - "id": "exem", - "realm": "exem", - "notBefore": 0, - "revokeRefreshToken": false, - "refreshTokenMaxReuse": 0, - "accessTokenLifespan": 300, - "accessTokenLifespanForImplicitFlow": 900, - "ssoSessionIdleTimeout": 1800, - "ssoSessionMaxLifespan": 36000, - "ssoSessionIdleTimeoutRememberMe": 0, - "ssoSessionMaxLifespanRememberMe": 0, - "offlineSessionIdleTimeout": 2592000, - "offlineSessionMaxLifespanEnabled": false, - "offlineSessionMaxLifespan": 5184000, - "clientSessionIdleTimeout": 0, - "clientSessionMaxLifespan": 0, - "clientOfflineSessionIdleTimeout": 0, - "clientOfflineSessionMaxLifespan": 0, - "accessCodeLifespan": 60, - "accessCodeLifespanUserAction": 300, - "accessCodeLifespanLogin": 1800, - "actionTokenGeneratedByAdminLifespan": 43200, - "actionTokenGeneratedByUserLifespan": 300, - "enabled": true, - "sslRequired": "none", - "registrationAllowed": false, - "registrationEmailAsUsername": false, - "rememberMe": false, - "verifyEmail": false, - "loginWithEmailAllowed": true, - "duplicateEmailsAllowed": false, - "resetPasswordAllowed": false, - "editUsernameAllowed": false, - "bruteForceProtected": false, - "permanentLockout": false, - "maxFailureWaitSeconds": 900, - "minimumQuickLoginWaitSeconds": 60, - "waitIncrementSeconds": 60, - "quickLoginCheckMilliSeconds": 1000, - "maxDeltaTimeSeconds": 43200, - "failureFactor": 30, - "roles": { - "realm": [ - { - "id": "b361dcb8-4ec4-484e-a432-8d40a8ca5ac8", - "name": "offline_access", - "description": "${role_offline-access}", - "composite": false, - "clientRole": false, - "containerId": "exem", - "attributes": {} - }, - { - "id": "621155f2-6c01-4e4a-bf11-47111503d696", - "name": "uma_authorization", - "description": "${role_uma_authorization}", - "composite": false, - "clientRole": false, - "containerId": "exem", - "attributes": {} - }, - { - "id": "4aadd73a-e863-466a-932b-5bc81553fbf1", - "name": "access", - "composite": false, - "clientRole": false, - "containerId": "exem", - "attributes": {} - } - ], - "client": { - "realm-management": [ - { - "id": "e3eca547-c372-406a-abe7-30f554e13e63", - "name": "manage-realm", - "description": "${role_manage-realm}", - "composite": false, - "clientRole": true, - "containerId": "73540f9a-bbb0-4c72-afbd-2a69586191e8", - "attributes": {} - }, - { - "id": "eb1faff2-4cca-458c-b9da-96c1f6f5f647", - "name": "impersonation", - "description": "${role_impersonation}", - "composite": false, - "clientRole": true, - "containerId": "73540f9a-bbb0-4c72-afbd-2a69586191e8", - "attributes": {} - }, - { - "id": "eb0f6ebb-8993-47f8-8979-2152ed92bf62", - "name": "create-client", - "description": "${role_create-client}", - "composite": false, - "clientRole": true, - "containerId": "73540f9a-bbb0-4c72-afbd-2a69586191e8", - "attributes": {} - }, - { - "id": "29f0b39d-9cc9-4b40-ad81-00041897ae0c", - "name": "view-clients", - "description": "${role_view-clients}", - "composite": true, - "composites": { - "client": { - "realm-management": [ - "query-clients" - ] - } - }, - "clientRole": true, - "containerId": "73540f9a-bbb0-4c72-afbd-2a69586191e8", - "attributes": {} - }, - { - "id": "b6307563-9b35-4093-b0c4-a27df7cb82bd", - "name": "query-groups", - "description": "${role_query-groups}", - "composite": false, - "clientRole": true, - "containerId": "73540f9a-bbb0-4c72-afbd-2a69586191e8", - "attributes": {} - }, - { - "id": "30091a91-f676-4e39-8ae2-ebfcee36c32a", - "name": "query-clients", - "description": "${role_query-clients}", - "composite": false, - "clientRole": true, - "containerId": "73540f9a-bbb0-4c72-afbd-2a69586191e8", - "attributes": {} - }, - { - "id": "b40ca071-2318-4f69-9664-f0dfe471d03b", - "name": "view-realm", - "description": "${role_view-realm}", - "composite": false, - "clientRole": true, - "containerId": "73540f9a-bbb0-4c72-afbd-2a69586191e8", - "attributes": {} - }, - { - "id": "efd25ec7-e61f-4659-a772-907791aed58e", - "name": "view-authorization", - "description": "${role_view-authorization}", - "composite": false, - "clientRole": true, - "containerId": "73540f9a-bbb0-4c72-afbd-2a69586191e8", - "attributes": {} - }, - { - "id": "4ad18bd0-f9a9-4fc7-8864-99afa71f95e4", - "name": "manage-users", - "description": "${role_manage-users}", - "composite": false, - "clientRole": true, - "containerId": "73540f9a-bbb0-4c72-afbd-2a69586191e8", - "attributes": {} - }, - { - "id": "a92c781f-7c6a-48d8-aa88-0b3aefb3c10c", - "name": "manage-events", - "description": "${role_manage-events}", - "composite": false, - "clientRole": true, - "containerId": "73540f9a-bbb0-4c72-afbd-2a69586191e8", - "attributes": {} - }, - { - "id": "424933c1-3c03-49cd-955c-34aeeb0a3108", - "name": "manage-authorization", - "description": "${role_manage-authorization}", - "composite": false, - "clientRole": true, - "containerId": "73540f9a-bbb0-4c72-afbd-2a69586191e8", - "attributes": {} - }, - { - "id": "5476db80-dbfa-408b-a934-5e8decc0af56", - "name": "manage-clients", - "description": "${role_manage-clients}", - "composite": false, - "clientRole": true, - "containerId": "73540f9a-bbb0-4c72-afbd-2a69586191e8", - "attributes": {} - }, - { - "id": "acf53868-d09b-4865-92da-3b906307b979", - "name": "realm-admin", - "description": "${role_realm-admin}", - "composite": true, - "composites": { - "client": { - "realm-management": [ - "manage-realm", - "impersonation", - "create-client", - "view-clients", - "query-groups", - "query-clients", - "view-realm", - "view-authorization", - "manage-users", - "manage-events", - "manage-authorization", - "manage-clients", - "query-users", - "query-realms", - "manage-identity-providers", - "view-users", - "view-events", - "view-identity-providers" - ] - } - }, - "clientRole": true, - "containerId": "73540f9a-bbb0-4c72-afbd-2a69586191e8", - "attributes": {} - }, - { - "id": "f2ad5f83-ffde-4cf4-acc4-21f7bcec4c38", - "name": "query-users", - "description": "${role_query-users}", - "composite": false, - "clientRole": true, - "containerId": "73540f9a-bbb0-4c72-afbd-2a69586191e8", - "attributes": {} - }, - { - "id": "96a017bf-5211-4c20-a1b2-7493bc45a3ad", - "name": "query-realms", - "description": "${role_query-realms}", - "composite": false, - "clientRole": true, - "containerId": "73540f9a-bbb0-4c72-afbd-2a69586191e8", - "attributes": {} - }, - { - "id": "d8051d4d-f26c-4a6d-bcdd-b3d8111d9d29", - "name": "manage-identity-providers", - "description": "${role_manage-identity-providers}", - "composite": false, - "clientRole": true, - "containerId": "73540f9a-bbb0-4c72-afbd-2a69586191e8", - "attributes": {} - }, - { - "id": "8c929b20-abc3-4b78-88f2-ed3348426667", - "name": "view-users", - "description": "${role_view-users}", - "composite": true, - "composites": { - "client": { - "realm-management": [ - "query-groups", - "query-users" - ] - } - }, - "clientRole": true, - "containerId": "73540f9a-bbb0-4c72-afbd-2a69586191e8", - "attributes": {} - }, - { - "id": "a337a8f7-8725-4ff7-85fc-ecc4b5ce1433", - "name": "view-events", - "description": "${role_view-events}", - "composite": false, - "clientRole": true, - "containerId": "73540f9a-bbb0-4c72-afbd-2a69586191e8", - "attributes": {} - }, - { - "id": "649350cf-925c-4502-84b4-ec8415f956d3", - "name": "view-identity-providers", - "description": "${role_view-identity-providers}", - "composite": false, - "clientRole": true, - "containerId": "73540f9a-bbb0-4c72-afbd-2a69586191e8", - "attributes": {} - } - ], - "authorization_server": [ - { - "id": "2346ca49-eb3e-4f2e-b0ec-4def9ea9655c", - "name": "access", - "composite": false, - "clientRole": true, - "containerId": "b9bbda1f-a756-4b72-9cd8-06a6dfd6d5bf", - "attributes": {} - } - ], - "security-admin-console": [], - "admin-cli": [], - "account-console": [], - "broker": [ - { - "id": "133ff901-3a8f-48df-893b-4c7e9047e829", - "name": "read-token", - "description": "${role_read-token}", - "composite": false, - "clientRole": true, - "containerId": "fdc71d6d-db86-414f-bd80-ed1f5e9a6975", - "attributes": {} - } - ], - "account": [ - { - "id": "89c5f56f-5845-400b-ac9f-942c46d082e0", - "name": "manage-account-links", - "description": "${role_manage-account-links}", - "composite": false, - "clientRole": true, - "containerId": "8c29b723-b140-4904-87d9-9b22627f9ff3", - "attributes": {} - }, - { - "id": "2cba7fed-0a80-4dbd-bd2d-abfa2c6a985e", - "name": "view-profile", - "description": "${role_view-profile}", - "composite": false, - "clientRole": true, - "containerId": "8c29b723-b140-4904-87d9-9b22627f9ff3", - "attributes": {} - }, - { - "id": "f446a93d-143f-4071-9bdc-08aa2fdce6d2", - "name": "view-consent", - "description": "${role_view-consent}", - "composite": false, - "clientRole": true, - "containerId": "8c29b723-b140-4904-87d9-9b22627f9ff3", - "attributes": {} - }, - { - "id": "ef3364db-e008-4aec-9e74-04bac25cbe40", - "name": "manage-consent", - "description": "${role_manage-consent}", - "composite": true, - "composites": { - "client": { - "account": [ - "view-consent" - ] - } - }, - "clientRole": true, - "containerId": "8c29b723-b140-4904-87d9-9b22627f9ff3", - "attributes": {} - }, - { - "id": "96afbe32-3ac2-4345-bc17-06cf0e8de0b4", - "name": "view-applications", - "description": "${role_view-applications}", - "composite": false, - "clientRole": true, - "containerId": "8c29b723-b140-4904-87d9-9b22627f9ff3", - "attributes": {} - }, - { - "id": "cf6861ca-4804-40d4-9016-c48e7ebf1c72", - "name": "manage-account", - "description": "${role_manage-account}", - "composite": true, - "composites": { - "client": { - "account": [ - "manage-account-links" - ] - } - }, - "clientRole": true, - "containerId": "8c29b723-b140-4904-87d9-9b22627f9ff3", - "attributes": {} - } - ] - } - }, - "groups": [ - { - "id": "8d3f7332-7f72-47e2-9cb3-38331f0c29b5", - "name": "DEFAULT_TENANT", - "path": "/DEFAULT_TENANT", - "attributes": {}, - "realmRoles": [], - "clientRoles": {}, - "subGroups": [] - } - ], - "defaultRoles": [ - "offline_access", - "uma_authorization" - ], - "requiredCredentials": [ - "password" - ], - "otpPolicyType": "totp", - "otpPolicyAlgorithm": "HmacSHA1", - "otpPolicyInitialCounter": 0, - "otpPolicyDigits": 6, - "otpPolicyLookAheadWindow": 1, - "otpPolicyPeriod": 30, - "otpSupportedApplications": [ - "FreeOTP", - "Google Authenticator" - ], - "webAuthnPolicyRpEntityName": "keycloak", - "webAuthnPolicySignatureAlgorithms": [ - "ES256" - ], - "webAuthnPolicyRpId": "", - "webAuthnPolicyAttestationConveyancePreference": "not specified", - "webAuthnPolicyAuthenticatorAttachment": "not specified", - "webAuthnPolicyRequireResidentKey": "not specified", - "webAuthnPolicyUserVerificationRequirement": "not specified", - "webAuthnPolicyCreateTimeout": 0, - "webAuthnPolicyAvoidSameAuthenticatorRegister": false, - "webAuthnPolicyAcceptableAaguids": [], - "webAuthnPolicyPasswordlessRpEntityName": "keycloak", - "webAuthnPolicyPasswordlessSignatureAlgorithms": [ - "ES256" - ], - "webAuthnPolicyPasswordlessRpId": "", - "webAuthnPolicyPasswordlessAttestationConveyancePreference": "not specified", - "webAuthnPolicyPasswordlessAuthenticatorAttachment": "not specified", - "webAuthnPolicyPasswordlessRequireResidentKey": "not specified", - "webAuthnPolicyPasswordlessUserVerificationRequirement": "not specified", - "webAuthnPolicyPasswordlessCreateTimeout": 0, - "webAuthnPolicyPasswordlessAvoidSameAuthenticatorRegister": false, - "webAuthnPolicyPasswordlessAcceptableAaguids": [], - "scopeMappings": [ - { - "clientScope": "offline_access", - "roles": [ - "offline_access" - ] - } - ], - "clientScopeMappings": { - "account": [ - { - "client": "account-console", - "roles": [ - "manage-account" - ] - } - ] - }, - "clients": [ - { - "id": "8c29b723-b140-4904-87d9-9b22627f9ff3", - "clientId": "account", - "name": "${client_account}", - "rootUrl": "${authBaseUrl}", - "baseUrl": "/realms/exem/account/", - "surrogateAuthRequired": false, - "enabled": true, - "alwaysDisplayInConsole": false, - "clientAuthenticatorType": "client-secret", - "secret": "**********", - "defaultRoles": [ - "view-profile", - "manage-account" - ], - "redirectUris": [ - "/realms/exem/account/*" - ], - "webOrigins": [], - "notBefore": 0, - "bearerOnly": false, - "consentRequired": false, - "standardFlowEnabled": true, - "implicitFlowEnabled": false, - "directAccessGrantsEnabled": false, - "serviceAccountsEnabled": false, - "publicClient": false, - "frontchannelLogout": false, - "protocol": "openid-connect", - "attributes": {}, - "authenticationFlowBindingOverrides": {}, - "fullScopeAllowed": false, - "nodeReRegistrationTimeout": 0, - "defaultClientScopes": [ - "web-origins", - "role_list", - "roles", - "profile", - "email" - ], - "optionalClientScopes": [ - "address", - "phone", - "offline_access", - "microprofile-jwt" - ] - }, - { - "id": "1e3d0c5d-c456-4c5f-93cf-58236273186a", - "clientId": "account-console", - "name": "${client_account-console}", - "rootUrl": "${authBaseUrl}", - "baseUrl": "/realms/exem/account/", - "surrogateAuthRequired": false, - "enabled": true, - "alwaysDisplayInConsole": false, - "clientAuthenticatorType": "client-secret", - "secret": "**********", - "redirectUris": [ - "/realms/exem/account/*" - ], - "webOrigins": [], - "notBefore": 0, - "bearerOnly": false, - "consentRequired": false, - "standardFlowEnabled": true, - "implicitFlowEnabled": false, - "directAccessGrantsEnabled": false, - "serviceAccountsEnabled": false, - "publicClient": true, - "frontchannelLogout": false, - "protocol": "openid-connect", - "attributes": { - "pkce.code.challenge.method": "S256" - }, - "authenticationFlowBindingOverrides": {}, - "fullScopeAllowed": false, - "nodeReRegistrationTimeout": 0, - "protocolMappers": [ - { - "id": "cceae7c8-fa8d-48eb-a0a6-6013a2cc771e", - "name": "audience resolve", - "protocol": "openid-connect", - "protocolMapper": "oidc-audience-resolve-mapper", - "consentRequired": false, - "config": {} - } - ], - "defaultClientScopes": [ - "web-origins", - "role_list", - "roles", - "profile", - "email" - ], - "optionalClientScopes": [ - "address", - "phone", - "offline_access", - "microprofile-jwt" - ] - }, - { - "id": "d4d3e5a5-584c-4aff-a79f-ac3c31ace5a1", - "clientId": "admin-cli", - "name": "${client_admin-cli}", - "surrogateAuthRequired": false, - "enabled": true, - "alwaysDisplayInConsole": false, - "clientAuthenticatorType": "client-secret", - "secret": "**********", - "redirectUris": [], - "webOrigins": [], - "notBefore": 0, - "bearerOnly": false, - "consentRequired": false, - "standardFlowEnabled": false, - "implicitFlowEnabled": false, - "directAccessGrantsEnabled": true, - "serviceAccountsEnabled": false, - "publicClient": true, - "frontchannelLogout": false, - "protocol": "openid-connect", - "attributes": {}, - "authenticationFlowBindingOverrides": {}, - "fullScopeAllowed": false, - "nodeReRegistrationTimeout": 0, - "defaultClientScopes": [ - "web-origins", - "role_list", - "roles", - "profile", - "email" - ], - "optionalClientScopes": [ - "address", - "phone", - "offline_access", - "microprofile-jwt" - ] - }, - { - "id": "b9bbda1f-a756-4b72-9cd8-06a6dfd6d5bf", - "clientId": "authorization_server", - "surrogateAuthRequired": false, - "enabled": true, - "alwaysDisplayInConsole": false, - "clientAuthenticatorType": "client-secret", - "secret": "**********", - "redirectUris": [ - "localhost" - ], - "webOrigins": [ - "*" - ], - "notBefore": 0, - "bearerOnly": false, - "consentRequired": false, - "standardFlowEnabled": true, - "implicitFlowEnabled": false, - "directAccessGrantsEnabled": true, - "serviceAccountsEnabled": false, - "publicClient": true, - "frontchannelLogout": false, - "protocol": "openid-connect", - "attributes": { - "saml.assertion.signature": "false", - "saml.force.post.binding": "false", - "saml.multivalued.roles": "false", - "saml.encrypt": "false", - "saml.server.signature": "false", - "saml.server.signature.keyinfo.ext": "false", - "exclude.session.state.from.auth.response": "false", - "saml_force_name_id_format": "false", - "saml.client.signature": "false", - "tls.client.certificate.bound.access.tokens": "false", - "saml.authnstatement": "false", - "display.on.consent.screen": "false", - "saml.onetimeuse.condition": "false" - }, - "authenticationFlowBindingOverrides": {}, - "fullScopeAllowed": true, - "nodeReRegistrationTimeout": -1, - "defaultClientScopes": [ - "web-origins", - "role_list", - "roles", - "profile", - "email" - ], - "optionalClientScopes": [ - "address", - "phone", - "offline_access", - "microprofile-jwt" - ] - }, - { - "id": "fdc71d6d-db86-414f-bd80-ed1f5e9a6975", - "clientId": "broker", - "name": "${client_broker}", - "surrogateAuthRequired": false, - "enabled": true, - "alwaysDisplayInConsole": false, - "clientAuthenticatorType": "client-secret", - "secret": "**********", - "redirectUris": [], - "webOrigins": [], - "notBefore": 0, - "bearerOnly": false, - "consentRequired": false, - "standardFlowEnabled": true, - "implicitFlowEnabled": false, - "directAccessGrantsEnabled": false, - "serviceAccountsEnabled": false, - "publicClient": false, - "frontchannelLogout": false, - "protocol": "openid-connect", - "attributes": {}, - "authenticationFlowBindingOverrides": {}, - "fullScopeAllowed": false, - "nodeReRegistrationTimeout": 0, - "defaultClientScopes": [ - "web-origins", - "role_list", - "roles", - "profile", - "email" - ], - "optionalClientScopes": [ - "address", - "phone", - "offline_access", - "microprofile-jwt" - ] - }, - { - "id": "73540f9a-bbb0-4c72-afbd-2a69586191e8", - "clientId": "realm-management", - "name": "${client_realm-management}", - "surrogateAuthRequired": false, - "enabled": true, - "alwaysDisplayInConsole": false, - "clientAuthenticatorType": "client-secret", - "secret": "**********", - "redirectUris": [], - "webOrigins": [], - "notBefore": 0, - "bearerOnly": true, - "consentRequired": false, - "standardFlowEnabled": true, - "implicitFlowEnabled": false, - "directAccessGrantsEnabled": false, - "serviceAccountsEnabled": false, - "publicClient": false, - "frontchannelLogout": false, - "protocol": "openid-connect", - "attributes": {}, - "authenticationFlowBindingOverrides": {}, - "fullScopeAllowed": false, - "nodeReRegistrationTimeout": 0, - "defaultClientScopes": [ - "web-origins", - "role_list", - "roles", - "profile", - "email" - ], - "optionalClientScopes": [ - "address", - "phone", - "offline_access", - "microprofile-jwt" - ] - }, - { - "id": "bb6c56f1-126e-4356-9579-d95992a8d150", - "clientId": "security-admin-console", - "name": "${client_security-admin-console}", - "rootUrl": "${authAdminUrl}", - "baseUrl": "/admin/exem/console/", - "surrogateAuthRequired": false, - "enabled": true, - "alwaysDisplayInConsole": false, - "clientAuthenticatorType": "client-secret", - "secret": "**********", - "redirectUris": [ - "/admin/exem/console/*" - ], - "webOrigins": [ - "+" - ], - "notBefore": 0, - "bearerOnly": false, - "consentRequired": false, - "standardFlowEnabled": true, - "implicitFlowEnabled": false, - "directAccessGrantsEnabled": false, - "serviceAccountsEnabled": false, - "publicClient": true, - "frontchannelLogout": false, - "protocol": "openid-connect", - "attributes": { - "pkce.code.challenge.method": "S256" - }, - "authenticationFlowBindingOverrides": {}, - "fullScopeAllowed": false, - "nodeReRegistrationTimeout": 0, - "protocolMappers": [ - { - "id": "3cf06cab-00dd-486b-8e72-1a453a7031ca", - "name": "locale", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-attribute-mapper", - "consentRequired": false, - "config": { - "userinfo.token.claim": "true", - "user.attribute": "locale", - "id.token.claim": "true", - "access.token.claim": "true", - "claim.name": "locale", - "jsonType.label": "String" - } - } - ], - "defaultClientScopes": [ - "web-origins", - "role_list", - "roles", - "profile", - "email" - ], - "optionalClientScopes": [ - "address", - "phone", - "offline_access", - "microprofile-jwt" - ] - } - ], - "clientScopes": [ - { - "id": "6a21eaaa-69c9-4519-8732-2155865a1891", - "name": "custom_jwt", - "protocol": "openid-connect", - "attributes": { - "include.in.token.scope": "true", - "display.on.consent.screen": "true" - }, - "protocolMappers": [ - { - "id": "fd7557f5-3174-4c65-8cd1-0e9f015a906f", - "name": "customizingJWT", - "protocol": "openid-connect", - "protocolMapper": "oidc-script-based-protocol-mapper", - "consentRequired": false, - "config": { - "userinfo.token.claim": "true", - "multivalued": "true", - "id.token.claim": "false", - "access.token.claim": "true", - "jsonType.label": "String", - "script": "/**\r\n * Available variables: \r\n * user - the current user\r\n * realm - the current realm\r\n * token - the current token\r\n * userSession - the current userSession\r\n * keycloakSession - the current keycloakSession\r\n */\r\n\r\n//insert your code here...\r\n\r\n// you can set standard fields in token - test code\r\n// token.setAcr(\"test value\");\r\n\r\n// you can set claims in the token - test code\r\n// token.getOtherClaims().put(\"claimName\", \"claim value\");\r\n\r\n// work with variables and return multivalued token value\r\nvar ArrayList = Java.type(\"java.util.ArrayList\");\r\nvar HashMap = Java.type(\"java.util.HashMap\");\r\nvar tenantInfoMap = new HashMap();\r\nvar tenantIpMap = new HashMap();\r\n\r\nvar forEach = Array.prototype.forEach;\r\n\r\nvar client = keycloakSession.getContext().getClient();\r\nvar groups = user.getGroups();\r\nvar clientRole = client.getRole(\"access\");\r\n\r\nforEach.call(groups.toArray(), function(group) {\r\n if(group.hasRole(clientRole)) {\r\n tenantIpMap.put(group.getName(), clientRole.getAttribute(\"ip\"));\r\n tenantInfoMap.put(group.getName(), group.getAttributes());\r\n }\r\n});\r\n\r\ntoken.setOtherClaims(\"tenantInfo\", tenantInfoMap);\r\n" - } - }, - { - "id": "2cb34189-9f06-4b9f-b066-c28e7930f0a5", - "name": "custom_phone", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-attribute-mapper", - "consentRequired": false, - "config": { - "userinfo.token.claim": "false", - "user.attribute": "phone", - "id.token.claim": "false", - "access.token.claim": "true", - "claim.name": "attributes.phone", - "jsonType.label": "String" - } - }, - { - "id": "6bcb0aa9-8713-4e4b-b997-2e08d2dda0f4", - "name": "group_attr", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-attribute-mapper", - "consentRequired": false, - "config": { - "userinfo.token.claim": "true", - "user.attribute": "groups", - "id.token.claim": "false", - "access.token.claim": "true", - "claim.name": "groups.attributes", - "jsonType.label": "String" - } - }, - { - "id": "03deb40b-4f83-436e-9eab-f479eed62460", - "name": "custom_name", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-attribute-mapper", - "consentRequired": false, - "config": { - "userinfo.token.claim": "false", - "user.attribute": "name", - "id.token.claim": "false", - "access.token.claim": "true", - "claim.name": "attributes.name", - "jsonType.label": "String" - } - } - ] - }, - { - "id": "9fed7d81-3f42-41b0-b661-7875abb90b2b", - "name": "microprofile-jwt", - "description": "Microprofile - JWT built-in scope", - "protocol": "openid-connect", - "attributes": { - "include.in.token.scope": "true", - "display.on.consent.screen": "false" - }, - "protocolMappers": [ - { - "id": "d030d675-2c31-401a-a461-534211b3d2ec", - "name": "upn", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-property-mapper", - "consentRequired": false, - "config": { - "userinfo.token.claim": "true", - "user.attribute": "username", - "id.token.claim": "true", - "access.token.claim": "true", - "claim.name": "upn", - "jsonType.label": "String" - } - }, - { - "id": "ca2026a0-84de-4b8d-bf0c-35f3d088b115", - "name": "groups", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-realm-role-mapper", - "consentRequired": false, - "config": { - "multivalued": "true", - "user.attribute": "foo", - "id.token.claim": "true", - "access.token.claim": "true", - "claim.name": "groups", - "jsonType.label": "String" - } - } - ] - }, - { - "id": "cf3e7fce-e9e8-40dc-bd0d-5cf7bac861c0", - "name": "web-origins", - "description": "OpenID Connect scope for add allowed web origins to the access token", - "protocol": "openid-connect", - "attributes": { - "include.in.token.scope": "false", - "display.on.consent.screen": "false", - "consent.screen.text": "" - }, - "protocolMappers": [ - { - "id": "6b909bad-30d8-4095-a80b-d71589e8a0b4", - "name": "allowed web origins", - "protocol": "openid-connect", - "protocolMapper": "oidc-allowed-origins-mapper", - "consentRequired": false, - "config": {} - } - ] - }, - { - "id": "73231863-d614-4725-9707-f5704c70893a", - "name": "roles", - "description": "OpenID Connect scope for add user roles to the access token", - "protocol": "openid-connect", - "attributes": { - "include.in.token.scope": "false", - "display.on.consent.screen": "true", - "consent.screen.text": "${rolesScopeConsentText}" - }, - "protocolMappers": [ - { - "id": "fad2c0b3-d6d6-46c9-b8a5-70cf2f3cd69e", - "name": "realm roles", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-realm-role-mapper", - "consentRequired": false, - "config": { - "multivalued": "true", - "user.attribute": "foo", - "access.token.claim": "true", - "claim.name": "realm_access.roles", - "jsonType.label": "String" - } - }, - { - "id": "1fa51f0e-8fa8-4807-a381-c9756ce1d2ff", - "name": "audience resolve", - "protocol": "openid-connect", - "protocolMapper": "oidc-audience-resolve-mapper", - "consentRequired": false, - "config": {} - }, - { - "id": "8be191ba-c7b8-45f1-a37f-2830595d4b54", - "name": "client roles", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-client-role-mapper", - "consentRequired": false, - "config": { - "multivalued": "true", - "user.attribute": "foo", - "access.token.claim": "true", - "claim.name": "resource_access.${client_id}.roles", - "jsonType.label": "String" - } - } - ] - }, - { - "id": "93a4b53a-a281-4203-a070-0ad31e719b29", - "name": "phone", - "description": "OpenID Connect built-in scope: phone", - "protocol": "openid-connect", - "attributes": { - "include.in.token.scope": "true", - "display.on.consent.screen": "true", - "consent.screen.text": "${phoneScopeConsentText}" - }, - "protocolMappers": [ - { - "id": "c716d4df-ad16-4a47-aa05-ded2a69313a3", - "name": "phone number verified", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-attribute-mapper", - "consentRequired": false, - "config": { - "userinfo.token.claim": "true", - "user.attribute": "phoneNumberVerified", - "id.token.claim": "true", - "access.token.claim": "true", - "claim.name": "phone_number_verified", - "jsonType.label": "boolean" - } - }, - { - "id": "db0fcb5b-bad6-42b7-8ab0-b90225100b8a", - "name": "phone number", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-attribute-mapper", - "consentRequired": false, - "config": { - "userinfo.token.claim": "true", - "user.attribute": "phoneNumber", - "id.token.claim": "true", - "access.token.claim": "true", - "claim.name": "phone_number", - "jsonType.label": "String" - } - } - ] - }, - { - "id": "f1723d4c-6d93-40be-b5b8-5ca7083e55c7", - "name": "address", - "description": "OpenID Connect built-in scope: address", - "protocol": "openid-connect", - "attributes": { - "include.in.token.scope": "true", - "display.on.consent.screen": "true", - "consent.screen.text": "${addressScopeConsentText}" - }, - "protocolMappers": [ - { - "id": "9e95dff0-dc01-4efe-a414-21c83d94491c", - "name": "address", - "protocol": "openid-connect", - "protocolMapper": "oidc-address-mapper", - "consentRequired": false, - "config": { - "user.attribute.formatted": "formatted", - "user.attribute.country": "country", - "user.attribute.postal_code": "postal_code", - "userinfo.token.claim": "true", - "user.attribute.street": "street", - "id.token.claim": "true", - "user.attribute.region": "region", - "access.token.claim": "true", - "user.attribute.locality": "locality" - } - } - ] - }, - { - "id": "16524b43-6bfc-4e05-868c-682e7e1e611c", - "name": "email", - "description": "OpenID Connect built-in scope: email", - "protocol": "openid-connect", - "attributes": { - "include.in.token.scope": "true", - "display.on.consent.screen": "true", - "consent.screen.text": "${emailScopeConsentText}" - }, - "protocolMappers": [ - { - "id": "4444c30e-5da5-46e6-a201-64c28ab26e10", - "name": "email verified", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-property-mapper", - "consentRequired": false, - "config": { - "userinfo.token.claim": "true", - "user.attribute": "emailVerified", - "id.token.claim": "true", - "access.token.claim": "true", - "claim.name": "email_verified", - "jsonType.label": "boolean" - } - }, - { - "id": "0faa8ba7-6d4d-4ed4-ab89-334e1d18b503", - "name": "email", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-property-mapper", - "consentRequired": false, - "config": { - "userinfo.token.claim": "true", - "user.attribute": "email", - "id.token.claim": "true", - "access.token.claim": "true", - "claim.name": "email", - "jsonType.label": "String" - } - } - ] - }, - { - "id": "4ccced80-99d8-4081-8d1d-37ed6d5aaf34", - "name": "profile", - "description": "OpenID Connect built-in scope: profile", - "protocol": "openid-connect", - "attributes": { - "include.in.token.scope": "true", - "display.on.consent.screen": "true", - "consent.screen.text": "${profileScopeConsentText}" - }, - "protocolMappers": [ - { - "id": "02aea132-f5e1-483c-968a-5fbb9cdfb82d", - "name": "updated at", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-attribute-mapper", - "consentRequired": false, - "config": { - "userinfo.token.claim": "true", - "user.attribute": "updatedAt", - "id.token.claim": "true", - "access.token.claim": "true", - "claim.name": "updated_at", - "jsonType.label": "String" - } - }, - { - "id": "eb5d10fc-d4a8-473a-ac3e-35f3fb0f41bb", - "name": "family name", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-property-mapper", - "consentRequired": false, - "config": { - "userinfo.token.claim": "true", - "user.attribute": "lastName", - "id.token.claim": "true", - "access.token.claim": "true", - "claim.name": "family_name", - "jsonType.label": "String" - } - }, - { - "id": "2467b8e5-f340-45a2-abff-c658eccf3ed3", - "name": "zoneinfo", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-attribute-mapper", - "consentRequired": false, - "config": { - "userinfo.token.claim": "true", - "user.attribute": "zoneinfo", - "id.token.claim": "true", - "access.token.claim": "true", - "claim.name": "zoneinfo", - "jsonType.label": "String" - } - }, - { - "id": "50a9bb17-af12-481d-95dd-6aed1dd4bf56", - "name": "full name", - "protocol": "openid-connect", - "protocolMapper": "oidc-full-name-mapper", - "consentRequired": false, - "config": { - "id.token.claim": "true", - "access.token.claim": "true", - "userinfo.token.claim": "true" - } - }, - { - "id": "80a65208-9425-4e66-b769-98c2f1c91e6e", - "name": "nickname", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-attribute-mapper", - "consentRequired": false, - "config": { - "userinfo.token.claim": "true", - "user.attribute": "nickname", - "id.token.claim": "true", - "access.token.claim": "true", - "claim.name": "nickname", - "jsonType.label": "String" - } - }, - { - "id": "68a750c6-b4b8-47f4-a919-752319e63213", - "name": "gender", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-attribute-mapper", - "consentRequired": false, - "config": { - "userinfo.token.claim": "true", - "user.attribute": "gender", - "id.token.claim": "true", - "access.token.claim": "true", - "claim.name": "gender", - "jsonType.label": "String" - } - }, - { - "id": "e27abd0e-72c1-40de-a678-e9e4e2db8e7f", - "name": "given name", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-property-mapper", - "consentRequired": false, - "config": { - "userinfo.token.claim": "true", - "user.attribute": "firstName", - "id.token.claim": "true", - "access.token.claim": "true", - "claim.name": "given_name", - "jsonType.label": "String" - } - }, - { - "id": "04f3fa01-6a4c-44eb-bfd8-0a0e1c31bc4a", - "name": "middle name", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-attribute-mapper", - "consentRequired": false, - "config": { - "userinfo.token.claim": "true", - "user.attribute": "middleName", - "id.token.claim": "true", - "access.token.claim": "true", - "claim.name": "middle_name", - "jsonType.label": "String" - } - }, - { - "id": "94e697d9-fbee-48d8-91d1-7bbc4f1fb44e", - "name": "username", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-property-mapper", - "consentRequired": false, - "config": { - "userinfo.token.claim": "true", - "user.attribute": "username", - "id.token.claim": "true", - "access.token.claim": "true", - "claim.name": "preferred_username", - "jsonType.label": "String" - } - }, - { - "id": "a2f05d76-947d-4ceb-969b-1b923be9a923", - "name": "website", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-attribute-mapper", - "consentRequired": false, - "config": { - "userinfo.token.claim": "true", - "user.attribute": "website", - "id.token.claim": "true", - "access.token.claim": "true", - "claim.name": "website", - "jsonType.label": "String" - } - }, - { - "id": "1966f863-ac5c-4cbc-a156-d5bd861728f0", - "name": "profile", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-attribute-mapper", - "consentRequired": false, - "config": { - "userinfo.token.claim": "true", - "user.attribute": "profile", - "id.token.claim": "true", - "access.token.claim": "true", - "claim.name": "profile", - "jsonType.label": "String" - } - }, - { - "id": "18a9b452-cd8e-4c43-a9a8-0ea532074f74", - "name": "locale", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-attribute-mapper", - "consentRequired": false, - "config": { - "userinfo.token.claim": "true", - "user.attribute": "locale", - "id.token.claim": "true", - "access.token.claim": "true", - "claim.name": "locale", - "jsonType.label": "String" - } - }, - { - "id": "1583790a-ec7a-4899-a901-60e23fd0d969", - "name": "birthdate", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-attribute-mapper", - "consentRequired": false, - "config": { - "userinfo.token.claim": "true", - "user.attribute": "birthdate", - "id.token.claim": "true", - "access.token.claim": "true", - "claim.name": "birthdate", - "jsonType.label": "String" - } - }, - { - "id": "7094b64a-492b-4f31-aa73-bb19d06ddb56", - "name": "picture", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-attribute-mapper", - "consentRequired": false, - "config": { - "userinfo.token.claim": "true", - "user.attribute": "picture", - "id.token.claim": "true", - "access.token.claim": "true", - "claim.name": "picture", - "jsonType.label": "String" - } - } - ] - }, - { - "id": "eff18c11-eaf4-4d6a-8365-90f646ea3cc5", - "name": "role_list", - "description": "SAML role list", - "protocol": "saml", - "attributes": { - "consent.screen.text": "${samlRoleListScopeConsentText}", - "display.on.consent.screen": "true" - }, - "protocolMappers": [ - { - "id": "3bb12700-3e6f-4a73-bfbb-cfd16a8ab007", - "name": "role list", - "protocol": "saml", - "protocolMapper": "saml-role-list-mapper", - "consentRequired": false, - "config": { - "single": "false", - "attribute.nameformat": "Basic", - "attribute.name": "Role" - } - } - ] - }, - { - "id": "e83e35b7-9650-4f7e-b182-65c184d261b3", - "name": "offline_access", - "description": "OpenID Connect built-in scope: offline_access", - "protocol": "openid-connect", - "attributes": { - "consent.screen.text": "${offlineAccessScopeConsentText}", - "display.on.consent.screen": "true" - } - } - ], - "defaultDefaultClientScopes": [ - "role_list", - "profile", - "email", - "roles", - "web-origins", - "custom_jwt" - ], - "defaultOptionalClientScopes": [ - "offline_access", - "address", - "phone", - "microprofile-jwt" - ], - "browserSecurityHeaders": { - "contentSecurityPolicyReportOnly": "", - "xContentTypeOptions": "nosniff", - "xRobotsTag": "none", - "xFrameOptions": "SAMEORIGIN", - "contentSecurityPolicy": "frame-src 'self'; frame-ancestors 'self'; object-src 'none';", - "xXSSProtection": "1; mode=block", - "strictTransportSecurity": "max-age=31536000; includeSubDomains" - }, - "smtpServer": {}, - "eventsEnabled": false, - "eventsListeners": [ - "jboss-logging" - ], - "enabledEventTypes": [], - "adminEventsEnabled": false, - "adminEventsDetailsEnabled": false, - "components": { - "org.keycloak.services.clientregistration.policy.ClientRegistrationPolicy": [ - { - "id": "9b1dcf02-e9ec-4302-8aad-28f3250d1b2d", - "name": "Allowed Protocol Mapper Types", - "providerId": "allowed-protocol-mappers", - "subType": "anonymous", - "subComponents": {}, - "config": { - "allowed-protocol-mapper-types": [ - "oidc-sha256-pairwise-sub-mapper", - "oidc-usermodel-property-mapper", - "saml-role-list-mapper", - "saml-user-attribute-mapper", - "oidc-full-name-mapper", - "oidc-usermodel-attribute-mapper", - "oidc-address-mapper", - "saml-user-property-mapper" - ] - } - }, - { - "id": "752137ea-bc3a-46c3-9d83-49cb370d39a9", - "name": "Max Clients Limit", - "providerId": "max-clients", - "subType": "anonymous", - "subComponents": {}, - "config": { - "max-clients": [ - "200" - ] - } - }, - { - "id": "f365d31f-ccc5-4e57-97bd-b2749b1ab5e5", - "name": "Allowed Client Scopes", - "providerId": "allowed-client-templates", - "subType": "authenticated", - "subComponents": {}, - "config": { - "allow-default-scopes": [ - "true" - ] - } - }, - { - "id": "52e385fd-3aa5-442d-b5e4-6ff659126196", - "name": "Allowed Protocol Mapper Types", - "providerId": "allowed-protocol-mappers", - "subType": "authenticated", - "subComponents": {}, - "config": { - "allowed-protocol-mapper-types": [ - "oidc-sha256-pairwise-sub-mapper", - "saml-user-attribute-mapper", - "oidc-full-name-mapper", - "oidc-usermodel-attribute-mapper", - "oidc-address-mapper", - "oidc-usermodel-property-mapper", - "saml-user-property-mapper", - "saml-role-list-mapper" - ] - } - }, - { - "id": "dbebbc9d-1b14-4d09-906c-b4e5638f9588", - "name": "Consent Required", - "providerId": "consent-required", - "subType": "anonymous", - "subComponents": {}, - "config": {} - }, - { - "id": "b3fc18dc-467f-4240-9b6d-f07df5c40aee", - "name": "Full Scope Disabled", - "providerId": "scope", - "subType": "anonymous", - "subComponents": {}, - "config": {} - }, - { - "id": "19e102da-1d66-4747-958b-9311e5156693", - "name": "Trusted Hosts", - "providerId": "trusted-hosts", - "subType": "anonymous", - "subComponents": {}, - "config": { - "host-sending-registration-request-must-match": [ - "true" - ], - "client-uris-must-match": [ - "true" - ] - } - }, - { - "id": "66e83112-7392-46cb-bbd5-b71586183ada", - "name": "Allowed Client Scopes", - "providerId": "allowed-client-templates", - "subType": "anonymous", - "subComponents": {}, - "config": { - "allow-default-scopes": [ - "true" - ] - } - } - ], - "org.keycloak.keys.KeyProvider": [ - { - "id": "a60adc1b-3f6b-40d4-901f-d4f744f0d71b", - "name": "aes-generated", - "providerId": "aes-generated", - "subComponents": {}, - "config": { - "priority": [ - "100" - ] - } - }, - { - "id": "bc1b25d8-b199-4d87-b606-6cde0f6eafb0", - "name": "hmac-generated", - "providerId": "hmac-generated", - "subComponents": {}, - "config": { - "priority": [ - "100" - ], - "algorithm": [ - "HS256" - ] - } - }, - { - "id": "fe624aa7-54a3-43d8-b2a3-f74b543a9225", - "name": "rsa-generated", - "providerId": "rsa-generated", - "subComponents": {}, - "config": { - "priority": [ - "100" - ] - } - } - ] - }, - "internationalizationEnabled": false, - "supportedLocales": [], - "authenticationFlows": [ - { - "id": "a837df3e-15cb-4d2a-8ce0-5eea5c704e76", - "alias": "Account verification options", - "description": "Method with which to verity the existing account", - "providerId": "basic-flow", - "topLevel": false, - "builtIn": true, - "authenticationExecutions": [ - { - "authenticator": "idp-email-verification", - "requirement": "ALTERNATIVE", - "priority": 10, - "userSetupAllowed": false, - "autheticatorFlow": false - }, - { - "requirement": "ALTERNATIVE", - "priority": 20, - "flowAlias": "Verify Existing Account by Re-authentication", - "userSetupAllowed": false, - "autheticatorFlow": true - } - ] - }, - { - "id": "59026e13-e2bd-4977-a868-505ea562f545", - "alias": "Authentication Options", - "description": "Authentication options.", - "providerId": "basic-flow", - "topLevel": false, - "builtIn": true, - "authenticationExecutions": [ - { - "authenticator": "basic-auth", - "requirement": "REQUIRED", - "priority": 10, - "userSetupAllowed": false, - "autheticatorFlow": false - }, - { - "authenticator": "basic-auth-otp", - "requirement": "DISABLED", - "priority": 20, - "userSetupAllowed": false, - "autheticatorFlow": false - }, - { - "authenticator": "auth-spnego", - "requirement": "DISABLED", - "priority": 30, - "userSetupAllowed": false, - "autheticatorFlow": false - } - ] - }, - { - "id": "484d422c-d9b4-4c0e-86d5-60463ecd24c9", - "alias": "Browser - Conditional OTP", - "description": "Flow to determine if the OTP is required for the authentication", - "providerId": "basic-flow", - "topLevel": false, - "builtIn": true, - "authenticationExecutions": [ - { - "authenticator": "conditional-user-configured", - "requirement": "REQUIRED", - "priority": 10, - "userSetupAllowed": false, - "autheticatorFlow": false - }, - { - "authenticator": "auth-otp-form", - "requirement": "REQUIRED", - "priority": 20, - "userSetupAllowed": false, - "autheticatorFlow": false - } - ] - }, - { - "id": "0ec05058-6d09-4951-a116-19e8810e5d8e", - "alias": "Direct Grant - Conditional OTP", - "description": "Flow to determine if the OTP is required for the authentication", - "providerId": "basic-flow", - "topLevel": false, - "builtIn": true, - "authenticationExecutions": [ - { - "authenticator": "conditional-user-configured", - "requirement": "REQUIRED", - "priority": 10, - "userSetupAllowed": false, - "autheticatorFlow": false - }, - { - "authenticator": "direct-grant-validate-otp", - "requirement": "REQUIRED", - "priority": 20, - "userSetupAllowed": false, - "autheticatorFlow": false - } - ] - }, - { - "id": "667c03cd-114c-4d9a-a7fa-7d2c27f10722", - "alias": "First broker login - Conditional OTP", - "description": "Flow to determine if the OTP is required for the authentication", - "providerId": "basic-flow", - "topLevel": false, - "builtIn": true, - "authenticationExecutions": [ - { - "authenticator": "conditional-user-configured", - "requirement": "REQUIRED", - "priority": 10, - "userSetupAllowed": false, - "autheticatorFlow": false - }, - { - "authenticator": "auth-otp-form", - "requirement": "REQUIRED", - "priority": 20, - "userSetupAllowed": false, - "autheticatorFlow": false - } - ] - }, - { - "id": "1510fbf7-239f-44aa-9955-72d42f6d99fd", - "alias": "Handle Existing Account", - "description": "Handle what to do if there is existing account with same email/username like authenticated identity provider", - "providerId": "basic-flow", - "topLevel": false, - "builtIn": true, - "authenticationExecutions": [ - { - "authenticator": "idp-confirm-link", - "requirement": "REQUIRED", - "priority": 10, - "userSetupAllowed": false, - "autheticatorFlow": false - }, - { - "requirement": "REQUIRED", - "priority": 20, - "flowAlias": "Account verification options", - "userSetupAllowed": false, - "autheticatorFlow": true - } - ] - }, - { - "id": "5622e71d-e1f4-4711-a425-a8470d0a017e", - "alias": "Reset - Conditional OTP", - "description": "Flow to determine if the OTP should be reset or not. Set to REQUIRED to force.", - "providerId": "basic-flow", - "topLevel": false, - "builtIn": true, - "authenticationExecutions": [ - { - "authenticator": "conditional-user-configured", - "requirement": "REQUIRED", - "priority": 10, - "userSetupAllowed": false, - "autheticatorFlow": false - }, - { - "authenticator": "reset-otp", - "requirement": "REQUIRED", - "priority": 20, - "userSetupAllowed": false, - "autheticatorFlow": false - } - ] - }, - { - "id": "09dfe405-5ef6-4940-8885-5adf867a74c8", - "alias": "User creation or linking", - "description": "Flow for the existing/non-existing user alternatives", - "providerId": "basic-flow", - "topLevel": false, - "builtIn": true, - "authenticationExecutions": [ - { - "authenticatorConfig": "create unique user config", - "authenticator": "idp-create-user-if-unique", - "requirement": "ALTERNATIVE", - "priority": 10, - "userSetupAllowed": false, - "autheticatorFlow": false - }, - { - "requirement": "ALTERNATIVE", - "priority": 20, - "flowAlias": "Handle Existing Account", - "userSetupAllowed": false, - "autheticatorFlow": true - } - ] - }, - { - "id": "a3eb6b61-1943-4fb7-9b2f-137826882662", - "alias": "Verify Existing Account by Re-authentication", - "description": "Reauthentication of existing account", - "providerId": "basic-flow", - "topLevel": false, - "builtIn": true, - "authenticationExecutions": [ - { - "authenticator": "idp-username-password-form", - "requirement": "REQUIRED", - "priority": 10, - "userSetupAllowed": false, - "autheticatorFlow": false - }, - { - "requirement": "CONDITIONAL", - "priority": 20, - "flowAlias": "First broker login - Conditional OTP", - "userSetupAllowed": false, - "autheticatorFlow": true - } - ] - }, - { - "id": "7f5e2f68-84bc-4703-b474-e3b092621195", - "alias": "browser", - "description": "browser based authentication", - "providerId": "basic-flow", - "topLevel": true, - "builtIn": true, - "authenticationExecutions": [ - { - "authenticator": "auth-cookie", - "requirement": "ALTERNATIVE", - "priority": 10, - "userSetupAllowed": false, - "autheticatorFlow": false - }, - { - "authenticator": "auth-spnego", - "requirement": "DISABLED", - "priority": 20, - "userSetupAllowed": false, - "autheticatorFlow": false - }, - { - "authenticator": "identity-provider-redirector", - "requirement": "ALTERNATIVE", - "priority": 25, - "userSetupAllowed": false, - "autheticatorFlow": false - }, - { - "requirement": "ALTERNATIVE", - "priority": 30, - "flowAlias": "forms", - "userSetupAllowed": false, - "autheticatorFlow": true - } - ] - }, - { - "id": "224cc520-37f7-445e-ab1f-7ba547a45a0d", - "alias": "clients", - "description": "Base authentication for clients", - "providerId": "client-flow", - "topLevel": true, - "builtIn": true, - "authenticationExecutions": [ - { - "authenticator": "client-secret", - "requirement": "ALTERNATIVE", - "priority": 10, - "userSetupAllowed": false, - "autheticatorFlow": false - }, - { - "authenticator": "client-jwt", - "requirement": "ALTERNATIVE", - "priority": 20, - "userSetupAllowed": false, - "autheticatorFlow": false - }, - { - "authenticator": "client-secret-jwt", - "requirement": "ALTERNATIVE", - "priority": 30, - "userSetupAllowed": false, - "autheticatorFlow": false - }, - { - "authenticator": "client-x509", - "requirement": "ALTERNATIVE", - "priority": 40, - "userSetupAllowed": false, - "autheticatorFlow": false - } - ] - }, - { - "id": "2e58184b-529b-450c-9731-29763d26b087", - "alias": "direct grant", - "description": "OpenID Connect Resource Owner Grant", - "providerId": "basic-flow", - "topLevel": true, - "builtIn": true, - "authenticationExecutions": [ - { - "authenticator": "direct-grant-validate-username", - "requirement": "REQUIRED", - "priority": 10, - "userSetupAllowed": false, - "autheticatorFlow": false - }, - { - "authenticator": "direct-grant-validate-password", - "requirement": "REQUIRED", - "priority": 20, - "userSetupAllowed": false, - "autheticatorFlow": false - }, - { - "requirement": "CONDITIONAL", - "priority": 30, - "flowAlias": "Direct Grant - Conditional OTP", - "userSetupAllowed": false, - "autheticatorFlow": true - } - ] - }, - { - "id": "c969ac8c-e7d8-44b5-ad4d-5fcb80514eac", - "alias": "docker auth", - "description": "Used by Docker clients to authenticate against the IDP", - "providerId": "basic-flow", - "topLevel": true, - "builtIn": true, - "authenticationExecutions": [ - { - "authenticator": "docker-http-basic-authenticator", - "requirement": "REQUIRED", - "priority": 10, - "userSetupAllowed": false, - "autheticatorFlow": false - } - ] - }, - { - "id": "de2259a4-7f92-42ec-994c-f55d8cba3b59", - "alias": "first broker login", - "description": "Actions taken after first broker login with identity provider account, which is not yet linked to any Keycloak account", - "providerId": "basic-flow", - "topLevel": true, - "builtIn": true, - "authenticationExecutions": [ - { - "authenticatorConfig": "review profile config", - "authenticator": "idp-review-profile", - "requirement": "REQUIRED", - "priority": 10, - "userSetupAllowed": false, - "autheticatorFlow": false - }, - { - "requirement": "REQUIRED", - "priority": 20, - "flowAlias": "User creation or linking", - "userSetupAllowed": false, - "autheticatorFlow": true - } - ] - }, - { - "id": "6c2745d2-be21-4f3c-a291-5b3fc039432a", - "alias": "forms", - "description": "Username, password, otp and other auth forms.", - "providerId": "basic-flow", - "topLevel": false, - "builtIn": true, - "authenticationExecutions": [ - { - "authenticator": "auth-username-password-form", - "requirement": "REQUIRED", - "priority": 10, - "userSetupAllowed": false, - "autheticatorFlow": false - }, - { - "requirement": "CONDITIONAL", - "priority": 20, - "flowAlias": "Browser - Conditional OTP", - "userSetupAllowed": false, - "autheticatorFlow": true - } - ] - }, - { - "id": "ac8f5082-3fd0-47c5-854d-0dd9c3951668", - "alias": "http challenge", - "description": "An authentication flow based on challenge-response HTTP Authentication Schemes", - "providerId": "basic-flow", - "topLevel": true, - "builtIn": true, - "authenticationExecutions": [ - { - "authenticator": "no-cookie-redirect", - "requirement": "REQUIRED", - "priority": 10, - "userSetupAllowed": false, - "autheticatorFlow": false - }, - { - "requirement": "REQUIRED", - "priority": 20, - "flowAlias": "Authentication Options", - "userSetupAllowed": false, - "autheticatorFlow": true - } - ] - }, - { - "id": "32030b4b-c82b-4c1a-a692-3b51eae74bbc", - "alias": "registration", - "description": "registration flow", - "providerId": "basic-flow", - "topLevel": true, - "builtIn": true, - "authenticationExecutions": [ - { - "authenticator": "registration-page-form", - "requirement": "REQUIRED", - "priority": 10, - "flowAlias": "registration form", - "userSetupAllowed": false, - "autheticatorFlow": true - } - ] - }, - { - "id": "b99fca4c-386c-4277-acc1-83e57e29244d", - "alias": "registration form", - "description": "registration form", - "providerId": "form-flow", - "topLevel": false, - "builtIn": true, - "authenticationExecutions": [ - { - "authenticator": "registration-user-creation", - "requirement": "REQUIRED", - "priority": 20, - "userSetupAllowed": false, - "autheticatorFlow": false - }, - { - "authenticator": "registration-profile-action", - "requirement": "REQUIRED", - "priority": 40, - "userSetupAllowed": false, - "autheticatorFlow": false - }, - { - "authenticator": "registration-password-action", - "requirement": "REQUIRED", - "priority": 50, - "userSetupAllowed": false, - "autheticatorFlow": false - }, - { - "authenticator": "registration-recaptcha-action", - "requirement": "DISABLED", - "priority": 60, - "userSetupAllowed": false, - "autheticatorFlow": false - } - ] - }, - { - "id": "5edbc053-816a-434e-9866-6c0cc7e49f89", - "alias": "reset credentials", - "description": "Reset credentials for a user if they forgot their password or something", - "providerId": "basic-flow", - "topLevel": true, - "builtIn": true, - "authenticationExecutions": [ - { - "authenticator": "reset-credentials-choose-user", - "requirement": "REQUIRED", - "priority": 10, - "userSetupAllowed": false, - "autheticatorFlow": false - }, - { - "authenticator": "reset-credential-email", - "requirement": "REQUIRED", - "priority": 20, - "userSetupAllowed": false, - "autheticatorFlow": false - }, - { - "authenticator": "reset-password", - "requirement": "REQUIRED", - "priority": 30, - "userSetupAllowed": false, - "autheticatorFlow": false - }, - { - "requirement": "CONDITIONAL", - "priority": 40, - "flowAlias": "Reset - Conditional OTP", - "userSetupAllowed": false, - "autheticatorFlow": true - } - ] - }, - { - "id": "460782e7-9644-4a34-8024-cb428cbe3991", - "alias": "saml ecp", - "description": "SAML ECP Profile Authentication Flow", - "providerId": "basic-flow", - "topLevel": true, - "builtIn": true, - "authenticationExecutions": [ - { - "authenticator": "http-basic-authenticator", - "requirement": "REQUIRED", - "priority": 10, - "userSetupAllowed": false, - "autheticatorFlow": false - } - ] - } - ], - "authenticatorConfig": [ - { - "id": "67af6e65-853c-4bfd-9eef-72e735691377", - "alias": "create unique user config", - "config": { - "require.password.update.after.registration": "false" - } - }, - { - "id": "af6c6e01-772d-426a-bdd3-3ebc95537bcd", - "alias": "review profile config", - "config": { - "update.profile.on.first.login": "missing" - } - } - ], - "requiredActions": [ - { - "alias": "CONFIGURE_TOTP", - "name": "Configure OTP", - "providerId": "CONFIGURE_TOTP", - "enabled": true, - "defaultAction": false, - "priority": 10, - "config": {} - }, - { - "alias": "terms_and_conditions", - "name": "Terms and Conditions", - "providerId": "terms_and_conditions", - "enabled": false, - "defaultAction": false, - "priority": 20, - "config": {} - }, - { - "alias": "UPDATE_PASSWORD", - "name": "Update Password", - "providerId": "UPDATE_PASSWORD", - "enabled": true, - "defaultAction": false, - "priority": 30, - "config": {} - }, - { - "alias": "UPDATE_PROFILE", - "name": "Update Profile", - "providerId": "UPDATE_PROFILE", - "enabled": true, - "defaultAction": false, - "priority": 40, - "config": {} - }, - { - "alias": "VERIFY_EMAIL", - "name": "Verify Email", - "providerId": "VERIFY_EMAIL", - "enabled": true, - "defaultAction": false, - "priority": 50, - "config": {} - }, - { - "alias": "update_user_locale", - "name": "Update User Locale", - "providerId": "update_user_locale", - "enabled": true, - "defaultAction": false, - "priority": 1000, - "config": {} - } - ], - "browserFlow": "browser", - "registrationFlow": "registration", - "directGrantFlow": "direct grant", - "resetCredentialsFlow": "reset credentials", - "clientAuthenticationFlow": "clients", - "dockerAuthenticationFlow": "docker auth", - "attributes": { - "clientOfflineSessionMaxLifespan": "0", - "clientSessionIdleTimeout": "0", - "clientSessionMaxLifespan": "0", - "clientOfflineSessionIdleTimeout": "0" - }, - "keycloakVersion": "11.0.1", - "userManagedAccessAllowed": false -} \ No newline at end of file diff --git a/roles/cmoa_install/files/06-imxc-ui/imxc-ui-jaeger/Chart.yaml b/roles/cmoa_install/files/06-imxc-ui/imxc-ui/Chart.yaml similarity index 100% rename from roles/cmoa_install/files/06-imxc-ui/imxc-ui-jaeger/Chart.yaml rename to roles/cmoa_install/files/06-imxc-ui/imxc-ui/Chart.yaml diff --git a/roles/cmoa_install/files/06-imxc-ui/imxc-ui-jaeger/scripts/init-api-server.sh b/roles/cmoa_install/files/06-imxc-ui/imxc-ui/scripts/init-api-server.sh similarity index 100% rename from roles/cmoa_install/files/06-imxc-ui/imxc-ui-jaeger/scripts/init-api-server.sh rename to roles/cmoa_install/files/06-imxc-ui/imxc-ui/scripts/init-api-server.sh diff --git a/roles/cmoa_install/files/06-imxc-ui/imxc-ui-jaeger/scripts/init-auth-server.sh b/roles/cmoa_install/files/06-imxc-ui/imxc-ui/scripts/init-auth-server.sh similarity index 100% rename from roles/cmoa_install/files/06-imxc-ui/imxc-ui-jaeger/scripts/init-auth-server.sh rename to roles/cmoa_install/files/06-imxc-ui/imxc-ui/scripts/init-auth-server.sh diff --git a/roles/cmoa_install/files/06-imxc-ui/imxc-ui-jaeger/scripts/init-noti-server.sh b/roles/cmoa_install/files/06-imxc-ui/imxc-ui/scripts/init-noti-server.sh similarity index 100% rename from roles/cmoa_install/files/06-imxc-ui/imxc-ui-jaeger/scripts/init-noti-server.sh rename to roles/cmoa_install/files/06-imxc-ui/imxc-ui/scripts/init-noti-server.sh diff --git a/roles/cmoa_install/files/06-imxc-ui/imxc-ui-jaeger/scripts/init-resource.sh b/roles/cmoa_install/files/06-imxc-ui/imxc-ui/scripts/init-resource.sh similarity index 100% rename from roles/cmoa_install/files/06-imxc-ui/imxc-ui-jaeger/scripts/init-resource.sh rename to roles/cmoa_install/files/06-imxc-ui/imxc-ui/scripts/init-resource.sh diff --git a/roles/cmoa_install/files/06-imxc-ui/imxc-ui-jaeger/scripts/init.json b/roles/cmoa_install/files/06-imxc-ui/imxc-ui/scripts/init.json similarity index 100% rename from roles/cmoa_install/files/06-imxc-ui/imxc-ui-jaeger/scripts/init.json rename to roles/cmoa_install/files/06-imxc-ui/imxc-ui/scripts/init.json diff --git a/roles/cmoa_install/files/06-imxc-ui/imxc-ui-jspd/templates/imxc-ui-config.yaml b/roles/cmoa_install/files/06-imxc-ui/imxc-ui/templates/imxc-ui-config.yaml similarity index 94% rename from roles/cmoa_install/files/06-imxc-ui/imxc-ui-jspd/templates/imxc-ui-config.yaml rename to roles/cmoa_install/files/06-imxc-ui/imxc-ui/templates/imxc-ui-config.yaml index e47ff66..b1471b2 100644 --- a/roles/cmoa_install/files/06-imxc-ui/imxc-ui-jspd/templates/imxc-ui-config.yaml +++ b/roles/cmoa_install/files/06-imxc-ui/imxc-ui/templates/imxc-ui-config.yaml @@ -17,7 +17,8 @@ data: socketURL: "http://{{ .Values.global.NOTI_SERVER_IP }}:{{ .Values.global.NOTI_SERVER_PORT }}/ui-server-websocket", // Env Settings interMaxURL // ex) ~/intermax/?paConnect=1&paType=ResponseInspector&fromTime=1556096539206&toTime=1556096599206&serverName=jeus89 - interMaxURL: "", + interMaxURL: "http://{{ .Values.global.INTERMAX_IP }}:{{ .Values.global.INTERMAX_PORT }}/intermax/?", + manualURL: "http://{{ .Values.global.CMOA_MANUAL_SERVER_IP }}:{{ .Values.global.CMOA_MANUAL_PORT }}", // Env Settings CloudMOA Version version: '{{ .Values.global.CLOUDMOA_VERSION }}', diff --git a/roles/cmoa_install/files/06-imxc-ui/imxc-ui-jspd/templates/imxc-ui-server.yaml b/roles/cmoa_install/files/06-imxc-ui/imxc-ui/templates/imxc-ui-server.yaml similarity index 100% rename from roles/cmoa_install/files/06-imxc-ui/imxc-ui-jspd/templates/imxc-ui-server.yaml rename to roles/cmoa_install/files/06-imxc-ui/imxc-ui/templates/imxc-ui-server.yaml diff --git a/roles/cmoa_install/files/06-imxc-ui/imxc-ui-jspd/values.yaml b/roles/cmoa_install/files/06-imxc-ui/imxc-ui/values.yaml similarity index 99% rename from roles/cmoa_install/files/06-imxc-ui/imxc-ui-jspd/values.yaml rename to roles/cmoa_install/files/06-imxc-ui/imxc-ui/values.yaml index bd63730..8792a7f 100644 --- a/roles/cmoa_install/files/06-imxc-ui/imxc-ui-jspd/values.yaml +++ b/roles/cmoa_install/files/06-imxc-ui/imxc-ui/values.yaml @@ -69,6 +69,7 @@ affinity: {} global: INTERMAX_IP: + INTERMAX_PORT: SERVELET_URL_PROTOCOL : http DEMO_SERVELET_URL_PROTOCOL : http KEYCLOAK_AUTH_SERVER_URL: http://111.111.111.111:31082/auth diff --git a/roles/cmoa_install/tasks/02-base-install.yml b/roles/cmoa_install/tasks/02-base-install.yml index f7924a6..076967a 100644 --- a/roles/cmoa_install/tasks/02-base-install.yml +++ b/roles/cmoa_install/tasks/02-base-install.yml @@ -49,3 +49,20 @@ port: "{{ elasticsearch_service_port }}" nodePort: "{{ elasticsearch_nodePort }}" apply: yes + +- name: 6. Change a Postgres Service (NodePort=postgres_nodePort) + kubernetes.core.k8s: + state: present + definition: + apiVersion: v1 + kind: Service + metadata: + name: "{{ postgres_service_name }}" + namespace: "{{ cmoa_namespace }}" + spec: + type: NodePort + ports: + - protocol: TCP + port: "{{ postgres_service_port }}" + nodePort: "{{ postgres_nodePort }}" + apply: yes diff --git a/roles/cmoa_install/tasks/06-imxc-ui-install.yml b/roles/cmoa_install/tasks/06-imxc-ui-install.yml index 7da82a1..aa067fb 100644 --- a/roles/cmoa_install/tasks/06-imxc-ui-install.yml +++ b/roles/cmoa_install/tasks/06-imxc-ui-install.yml @@ -1,79 +1,4 @@ --- -- name: 1. helmchart install (imxc-ui-all) - kubernetes.core.helm: - name: "{{item}}" - release_name: "{{item}}" - release_namespace: "{{ cmoa_namespace }}" - chart_ref: "{{ role_path }}/files/06-imxc-ui/{{ item }}" - create_namespace: yes - release_state: present - values_files: - - "{{ role_path }}/files/06-imxc-ui/{{ item }}/values.yaml" - with_items: - - imxc-ui-jaeger - - imxc-ui-jspd - when: imxc_ui == 'all' - -- name: 1. helmchart install (imxc-ui-jaeger) - kubernetes.core.helm: - name: "{{item}}" - release_name: "{{item}}" - release_namespace: "{{ cmoa_namespace }}" - chart_ref: "{{ role_path }}/files/06-imxc-ui/{{ item }}" - create_namespace: yes - release_state: present - values_files: - - "{{ role_path }}/files/06-imxc-ui/{{ item }}/values.yaml" - with_items: - - imxc-ui-jaeger - when: imxc_ui == 'jaeger' - -- name: 2. Change a imxc-ui Service (imxc-ui-jaeger) - kubernetes.core.k8s: - state: present - definition: - apiVersion: v1 - kind: Service - metadata: - name: "{{ jaeger_servicename }}" - namespace: "{{ cmoa_namespace }}" - spec: - type: NodePort - ports: - - protocol: TCP - port: "{{ jaeger_service_port }}" - nodePort: "{{ jaeger_nodePort }}" - apply: yes - when: imxc_ui == 'jaeger' - -- name: 2. Get a list of all pods from the namespace - command: kubectl -n "{{ cmoa_namespace }}" get pods --no-headers -o custom-columns=":metadata.name" # Output is a column - register: pod_list - when: imxc_ui != 'all' - -- name: 3. Copy psql file in psql (imxc-jaeger) - kubernetes.core.k8s_cp: - namespace: "{{ cmoa_namespace }}" - pod: "{{ item }}" - remote_path: /tmp/jaeger_menumeta.psql - local_path: "{{ role_path }}/files/03-ddl-dml/postgres/jaeger_menumeta.psql" - with_items: "{{ pod_list.stdout_lines }}" - when: - - item is match('postgres') - - imxc_ui == 'jaeger' - ignore_errors: true - -- name: 4. Execute a command in psql (imxc-jaeger) - kubernetes.core.k8s_exec: - namespace: "{{ cmoa_namespace }}" - pod: "{{ item }}" - command: bash -c "PGPASSWORD='eorbahrhkswp' && /usr/bin/psql -h 'localhost' -U 'admin' -d 'postgresdb' -f /tmp/jaeger_menumeta.psql" - with_items: "{{ pod_list.stdout_lines }}" - when: - - item is match('postgres') - - imxc_ui == 'jaeger' - ignore_errors: true - - name: 1. helmchart install (imxc-ui-jspd) kubernetes.core.helm: name: "{{item}}" @@ -85,27 +10,7 @@ values_files: - "{{ role_path }}/files/06-imxc-ui/{{ item }}/values.yaml" with_items: - - imxc-ui-jspd - when: imxc_ui == 'jspd' - ignore_errors: true - -- name: 3. Copy psql file in postgres (imxc-ui-jspd) - kubernetes.core.k8s_cp: - namespace: "{{ cmoa_namespace }}" - pod: "{{ item }}" - remote_path: /tmp/jspd_menumeta.psql - local_path: "{{ role_path }}/files/03-ddl-dml/postgres/jspd_menumeta.psql" - with_items: "{{ pod_list.stdout_lines }}" - when: item is match('postgres') and imxc_ui == 'jspd' - ignore_errors: true - -- name: 4. Execute a command in postgres (imxc-ui-jspd) - kubernetes.core.k8s_exec: - namespace: "{{ cmoa_namespace }}" - pod: "{{ item }}" - command: bash -c "PGPASSWORD='eorbahrhkswp' && /usr/bin/psql -h 'localhost' -U 'admin' -d 'postgresdb' -f /tmp/jspd_menumeta.psql" - with_items: "{{ pod_list.stdout_lines }}" - when: item is match('postgres') and imxc_ui == 'jspd' + - imxc-ui ignore_errors: true - name: 2. Check Kubernetes Pods (imxc ui) diff --git a/roles/cmoa_install/tasks/06-imxc-ui-install.yml_bak b/roles/cmoa_install/tasks/06-imxc-ui-install.yml_bak new file mode 100644 index 0000000..7da82a1 --- /dev/null +++ b/roles/cmoa_install/tasks/06-imxc-ui-install.yml_bak @@ -0,0 +1,112 @@ +--- +- name: 1. helmchart install (imxc-ui-all) + kubernetes.core.helm: + name: "{{item}}" + release_name: "{{item}}" + release_namespace: "{{ cmoa_namespace }}" + chart_ref: "{{ role_path }}/files/06-imxc-ui/{{ item }}" + create_namespace: yes + release_state: present + values_files: + - "{{ role_path }}/files/06-imxc-ui/{{ item }}/values.yaml" + with_items: + - imxc-ui-jaeger + - imxc-ui-jspd + when: imxc_ui == 'all' + +- name: 1. helmchart install (imxc-ui-jaeger) + kubernetes.core.helm: + name: "{{item}}" + release_name: "{{item}}" + release_namespace: "{{ cmoa_namespace }}" + chart_ref: "{{ role_path }}/files/06-imxc-ui/{{ item }}" + create_namespace: yes + release_state: present + values_files: + - "{{ role_path }}/files/06-imxc-ui/{{ item }}/values.yaml" + with_items: + - imxc-ui-jaeger + when: imxc_ui == 'jaeger' + +- name: 2. Change a imxc-ui Service (imxc-ui-jaeger) + kubernetes.core.k8s: + state: present + definition: + apiVersion: v1 + kind: Service + metadata: + name: "{{ jaeger_servicename }}" + namespace: "{{ cmoa_namespace }}" + spec: + type: NodePort + ports: + - protocol: TCP + port: "{{ jaeger_service_port }}" + nodePort: "{{ jaeger_nodePort }}" + apply: yes + when: imxc_ui == 'jaeger' + +- name: 2. Get a list of all pods from the namespace + command: kubectl -n "{{ cmoa_namespace }}" get pods --no-headers -o custom-columns=":metadata.name" # Output is a column + register: pod_list + when: imxc_ui != 'all' + +- name: 3. Copy psql file in psql (imxc-jaeger) + kubernetes.core.k8s_cp: + namespace: "{{ cmoa_namespace }}" + pod: "{{ item }}" + remote_path: /tmp/jaeger_menumeta.psql + local_path: "{{ role_path }}/files/03-ddl-dml/postgres/jaeger_menumeta.psql" + with_items: "{{ pod_list.stdout_lines }}" + when: + - item is match('postgres') + - imxc_ui == 'jaeger' + ignore_errors: true + +- name: 4. Execute a command in psql (imxc-jaeger) + kubernetes.core.k8s_exec: + namespace: "{{ cmoa_namespace }}" + pod: "{{ item }}" + command: bash -c "PGPASSWORD='eorbahrhkswp' && /usr/bin/psql -h 'localhost' -U 'admin' -d 'postgresdb' -f /tmp/jaeger_menumeta.psql" + with_items: "{{ pod_list.stdout_lines }}" + when: + - item is match('postgres') + - imxc_ui == 'jaeger' + ignore_errors: true + +- name: 1. helmchart install (imxc-ui-jspd) + kubernetes.core.helm: + name: "{{item}}" + release_name: "{{item}}" + release_namespace: "{{ cmoa_namespace }}" + chart_ref: "{{ role_path }}/files/06-imxc-ui/{{ item }}" + create_namespace: yes + release_state: present + values_files: + - "{{ role_path }}/files/06-imxc-ui/{{ item }}/values.yaml" + with_items: + - imxc-ui-jspd + when: imxc_ui == 'jspd' + ignore_errors: true + +- name: 3. Copy psql file in postgres (imxc-ui-jspd) + kubernetes.core.k8s_cp: + namespace: "{{ cmoa_namespace }}" + pod: "{{ item }}" + remote_path: /tmp/jspd_menumeta.psql + local_path: "{{ role_path }}/files/03-ddl-dml/postgres/jspd_menumeta.psql" + with_items: "{{ pod_list.stdout_lines }}" + when: item is match('postgres') and imxc_ui == 'jspd' + ignore_errors: true + +- name: 4. Execute a command in postgres (imxc-ui-jspd) + kubernetes.core.k8s_exec: + namespace: "{{ cmoa_namespace }}" + pod: "{{ item }}" + command: bash -c "PGPASSWORD='eorbahrhkswp' && /usr/bin/psql -h 'localhost' -U 'admin' -d 'postgresdb' -f /tmp/jspd_menumeta.psql" + with_items: "{{ pod_list.stdout_lines }}" + when: item is match('postgres') and imxc_ui == 'jspd' + ignore_errors: true + +- name: 2. Check Kubernetes Pods (imxc ui) + command: "{{ role_path }}/files/k8s_status {{ cmoa_namespace }}" diff --git a/roles/cmoa_install/tasks/08-finish.yml b/roles/cmoa_install/tasks/08-finish.yml index 4fd19f4..acb39d2 100644 --- a/roles/cmoa_install/tasks/08-finish.yml +++ b/roles/cmoa_install/tasks/08-finish.yml @@ -12,6 +12,5 @@ msg: - ======================================================================================= - "## CloudMOA WEB " - - CloudMOA Jaeger = http://{{ ansible_default_ipv4.address }}:31080 - - CloudMOA JSPD = http://{{ ansible_default_ipv4.address }}:31084 + - http://{{ ansible_default_ipv4.address }}:31080 - ======================================================================================= diff --git a/roles/cmoa_install/tasks/main.yml b/roles/cmoa_install/tasks/main.yml index a965c7a..3bfcbc8 100644 --- a/roles/cmoa_install/tasks/main.yml +++ b/roles/cmoa_install/tasks/main.yml @@ -3,8 +3,8 @@ tags: worker-dir when: kubernetes_role == 'node' -- include: helm-install.yml - tags: helm-install + #- include: helm-install.yml + # tags: helm-install - include: 00-default-settings-master.yml tags: default_setting diff --git a/roles/cmoa_os_setting/tasks/01-ubuntu-os-crio.yml b/roles/cmoa_os_setting/tasks/01-ubuntu-os-crio.yml index a80216e..9db8e7d 100644 --- a/roles/cmoa_os_setting/tasks/01-ubuntu-os-crio.yml +++ b/roles/cmoa_os_setting/tasks/01-ubuntu-os-crio.yml @@ -1,9 +1,27 @@ --- -- name: Add crio yum repository - command: sudo curl -L -o /etc/yum.repos.d/devel:kubic:libcontainers:stable.repo https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/CentOS_7/devel:kubic:libcontainers:stable.repo +- name: Import GPG key_1 + apt_key: + url: https://download.opensuse.org/repositories/devel:kubic:libcontainers:stable:cri-o:{{ crio.version }}/{{ crio.os }}/Release.key + state: present + become: true -- name: Add crio yum repository - command: sudo curl -L -o /etc/yum.repos.d/devel:kubic:libcontainers:stable:cri-o:1.23.repo https://download.opensuse.org/repositories/devel:kubic:libcontainers:stable:cri-o:1.23/CentOS_7/devel:kubic:libcontainers:stable:cri-o:1.23.repo +- name: Import GPG key_2 + apt_key: + url: https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/{{ crio.os }}/Release.key + state: present + become: true + +- name: Add crio repository_1 + apt_repository: + repo: deb https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/{{crio.os }}/ / + state: present + filename: devel:kubic:libcontainers:stable.list + +- name: Add crio repository_2 + apt_repository: + repo: deb http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable:/cri-o:/{{ crio.version }}/{{ crio.os }}/ / + state: present + filename: devel:kubic:libcontainers:stable:cri-o:{{ crio.version }}.list - name: Create crio configuration directory file: @@ -19,8 +37,9 @@ - name: Install required packages apt: - name: - - crio + name: ['cri-o', 'cri-o-runc'] + state: present + update_cache: yes notify: - Reload systemd configuration - Restart crio service diff --git a/test.sh b/test.sh new file mode 100644 index 0000000..9f368bb --- /dev/null +++ b/test.sh @@ -0,0 +1,3087 @@ +#!/bin/sh + +temp=$(kubectl get svc -n imxc -o wide | grep elasticsearch | grep NodePort | awk {'print $5'}) +#export ES_NODEPORT=${temp:5:(-4)} +export ES_NODEPORT=30200 +echo $ES_NODEPORT + +export MASTER_IP=$(kubectl get nodes -o wide | grep master | awk {'print $6'}) +export MASTER_IP=10.10.43.200 +echo $MASTER_IP + +export NUM_SHARDS=2 +export NUM_REPLICAS=1 + +SECURE=true + +if [ $SECURE = true ] +then +PARAM="-u elastic:elastic --insecure" +PROTO="https" +else +PARAM="" +PROTO="http" +fi + +echo Secure=$SECURE +echo Param=$PARAM +echo Proto=$PROTO + +curl ${PARAM} -X GET ${PROTO}://${MASTER_IP}:${ES_NODEPORT}/_cat/indices + + +# kubernetes_cluster_info +curl $PARAM -X PUT $PROTO'://'"${MASTER_IP}"':'"${ES_NODEPORT}"'/_template/kubernetes_cluster_info' -H 'Content-Type: application/json' -d '{ + "order": 0, + "index_patterns": [ + "kubernetes_cluster_info" + ], + "settings": { + "index": { + "number_of_shards": '""${NUM_SHARDS}""', + "number_of_replicas": '""${NUM_REPLICAS}""', + "refresh_interval": "1s", + "sort.field": "mtime", + "sort.order": "desc" + } + }, + "mappings": { + "properties": { + "cluster": { + "type": "keyword" + }, + "date": { + "type": "long" + }, + "mtime": { + "type": "long" + }, + "nodes": { + "type": "text", + "index": false + } + } + } +}' + +# kubernetes_cluster_history +curl $PARAM -X PUT $PROTO'://'"${MASTER_IP}"':'"${ES_NODEPORT}"'/_ilm/policy/kubernetes_cluster_history' -H 'Content-Type: application/json' -d '{ + "policy": { + "phases": { + "delete": { + "min_age": "1d", + "actions": { + "delete": {} + } + } + } + } +}' + +curl $PARAM -X PUT $PROTO'://'"${MASTER_IP}"':'"${ES_NODEPORT}"'/_template/kubernetes_cluster_history' -H 'Content-Type: application/json' -d '{ + "order": 0, + "index_patterns": [ + "kubernetes_cluster_history-*" + ], + "settings": { + "index": { + "number_of_shards": '""${NUM_SHARDS}""', + "number_of_replicas": '""${NUM_REPLICAS}""', + "refresh_interval": "1s", + "lifecycle": { + "name": "kubernetes_cluster_history" + }, + "sort.field": "mtime", + "sort.order": "desc" + } + }, + "mappings": { + "properties": { + "cluster": { + "type": "keyword" + }, + "mtime": { + "type": "long" + }, + "nodes": { + "type": "text", + "index": false + } + } + }, + "aliases": { + "kubernetes_cluster_history": {} + } +}' + +# kubernetes_info +curl $PARAM -X PUT $PROTO'://'"${MASTER_IP}"':'"${ES_NODEPORT}"'/_ilm/policy/kubernetes_info' -H 'Content-Type: application/json' -d '{ + "policy": { + "phases": { + "delete": { + "min_age": "1d", + "actions": { + "delete": {} + } + } + } + } +}' + +curl $PARAM -X PUT $PROTO'://'"${MASTER_IP}"':'"${ES_NODEPORT}"'/_template/kubernetes_info' -H 'Content-Type: application/json' -d '{ + "order": 0, + "index_patterns": [ + "kubernetes_info-*" + ], + "settings": { + "index": { + "number_of_shards": '""${NUM_SHARDS}""', + "number_of_replicas": '""${NUM_REPLICAS}""', + "refresh_interval": "1s", + "lifecycle": { + "name": "kubernetes_info" + }, + "sort.field": "mtime", + "sort.order": "desc" + } + }, + "mappings": { + "properties": { + "id": { + "type": "keyword" + }, + "mtime": { + "type": "long" + }, + "data": { + "type": "text", + "index": false + } + } + }, + "aliases": { + "kubernetes_info": {} + } +}' + + + +# kubernetes_event_info +curl $PARAM -X PUT $PROTO'://'"${MASTER_IP}"':'"${ES_NODEPORT}"'/_ilm/policy/kubernetes_event_info' -H 'Content-Type: application/json' -d '{ + "policy": { + "phases": { + "delete": { + "min_age": "7d", + "actions": { + "delete": {} + } + } + } + } +}' + +curl $PARAM -X PUT $PROTO'://'"${MASTER_IP}"':'"${ES_NODEPORT}"'/_template/kubernetes_event_info' -H 'Content-Type: application/json' -d '{ + "order": 0, + "index_patterns": [ + "kubernetes_event_info-*" + ], + "settings": { + "index": { + "number_of_shards": '""${NUM_SHARDS}""', + "number_of_replicas": '""${NUM_REPLICAS}""', + "refresh_interval": "1s", + "lifecycle": { + "name": "kubernetes_event_info" + } + }, + "analysis": { + "analyzer": { + "my_customer_ngram_analyzer": { + "tokenizer": "my_customer_ngram_tokenizer" + } + }, + "tokenizer": { + "my_customer_ngram_tokenizer": { + "type": "ngram", + "min_gram": "2", + "max_gram": "3" + } + } + } + }, + "mappings": { + "properties": { + "cluster": { + "type": "keyword" + }, + "namespace": { + "type": "keyword" + }, + "type": { + "type": "keyword" + }, + "unixtime": { + "type": "long" + }, + "kind": { + "type": "keyword" + }, + "name": { + "type": "keyword" + }, + "firsttime": { + "type": "long" + }, + "lasttime": { + "type": "long" + }, + "data": { + "type": "text", + "index": false + }, + "id": { + "type": "keyword" + }, + "reason": { + "type": "keyword" + }, + "message": { + "type": "text", + "fields": { + "ngram": { + "type": "text", + "analyzer": "my_customer_ngram_analyzer" + } + } + }, + "count": { + "type": "integer" + }, + "sourceComponent": { + "type": "keyword" + }, + "sourceHost": { + "type": "keyword" + } + } + }, + "aliases": { + "kubernetes_event_info": {} + } +}' + + + + +# kubernetes_job_info +curl $PARAM -X PUT $PROTO'://'"${MASTER_IP}"':'"${ES_NODEPORT}"'/_ilm/policy/kubernetes_job_info' -H 'Content-Type: application/json' -d '{ + "policy": { + "phases": { + "delete": { + "min_age": "7d", + "actions": { + "delete": {} + } + } + } + } +}' + +curl $PARAM -X PUT $PROTO'://'"${MASTER_IP}"':'"${ES_NODEPORT}"'/_template/kubernetes_job_info' -H 'Content-Type: application/json' -d '{ + "order": 0, + "index_patterns": [ + "kubernetes_job_info-*" + ], + "settings": { + "index": { + "number_of_shards": '""${NUM_SHARDS}""', + "number_of_replicas": '""${NUM_REPLICAS}""', + "refresh_interval": "1s", + "lifecycle": { + "name": "kubernetes_job_info" + } + } + }, + "mappings": { + "properties": { + "cluster": { + "type": "keyword" + }, + "namespace": { + "type": "keyword" + }, + "name": { + "type": "keyword" + }, + "starttime": { + "type": "long" + }, + "endtime": { + "type": "long" + }, + "duration": { + "type": "long" + }, + "commandlist": { + "type": "text", + "index": false + }, + "labellist": { + "type": "text", + "index": false + }, + "active": { + "type": "boolean" + }, + "status": { + "type": "keyword" + } + } + }, + "aliases": { + "kubernetes_job_info": {} + } +}' + + + +# kubernetes_cronjob_info +curl $PARAM -X PUT $PROTO'://'"${MASTER_IP}"':'"${ES_NODEPORT}"'/_ilm/policy/kubernetes_cronjob_info' -H 'Content-Type: application/json' -d '{ + "policy": { + "phases": { + "delete": { + "min_age": "7d", + "actions": { + "delete": {} + } + } + } + } +}' + +curl $PARAM -X PUT $PROTO'://'"${MASTER_IP}"':'"${ES_NODEPORT}"'/_template/kubernetes_cronjob_info' -H 'Content-Type: application/json' -d '{ + "order": 0, + "index_patterns": [ + "kubernetes_cronjob_info-*" + ], + "settings": { + "index": { + "number_of_shards": '""${NUM_SHARDS}""', + "number_of_replicas": '""${NUM_REPLICAS}""', + "refresh_interval": "1s", + "lifecycle": { + "name": "kubernetes_cronjob_info" + } + } + }, + "mappings": { + "properties": { + "cluster": { + "type": "keyword" + }, + "namespace": { + "type": "keyword" + }, + "name": { + "type": "keyword" + }, + "jobname": { + "type": "keyword" + }, + "kind": { + "type": "keyword" + }, + "starttime": { + "type": "long" + }, + "endtime": { + "type": "long" + }, + "duration": { + "type": "long" + }, + "lastruntime": { + "type": "long" + }, + "arguments": { + "type": "text", + "index": false + }, + "schedule": { + "type": "keyword" + }, + "active": { + "type": "boolean" + }, + "status": { + "type": "keyword" + } + } + }, + "aliases": { + "kubernetes_cronjob_info": {} + } +}' + + + + +# kubernetes_network_connectivity +curl $PARAM -X PUT $PROTO'://'"${MASTER_IP}"':'"${ES_NODEPORT}"'/_ilm/policy/kubernetes_network_connectivity' -H 'Content-Type: application/json' -d '{ + "policy": { + "phases": { + "delete": { + "min_age": "1d", + "actions": { + "delete": {} + } + } + } + } +}' + +curl $PARAM -X PUT $PROTO'://'"${MASTER_IP}"':'"${ES_NODEPORT}"'/_template/kubernetes_network_connectivity' -H 'Content-Type: application/json' -d '{ + "order": 0, + "index_patterns": [ + "kubernetes_network_connectivity-*" + ], + "settings": { + "index": { + "number_of_shards": '""${NUM_SHARDS}""', + "number_of_replicas": '""${NUM_REPLICAS}""', + "refresh_interval": "1s", + "lifecycle": { + "name": "kubernetes_network_connectivity" + } + } + }, + "mappings": { + "properties": { + "timestamp": { + "type": "long" + }, + "cluster": { + "type": "keyword" + }, + "node": { + "type": "keyword" + }, + "namespace": { + "type": "keyword" + }, + "service": { + "type": "keyword" + }, + "pod": { + "type": "keyword" + }, + "container": { + "type": "keyword" + }, + "pid": { + "type": "integer" + }, + "peerNode": { + "type": "keyword" + }, + "peerNamespace": { + "type": "keyword" + }, + "peerService": { + "type": "keyword" + }, + "peerPod": { + "type": "keyword" + }, + "peerContainer": { + "type": "keyword" + }, + "peerPid": { + "type": "integer" + } + } + }, + "aliases": { + "kubernetes_network_connectivity": {} + } +}' + + + +# sparse_log +curl $PARAM -X PUT $PROTO'://'"${MASTER_IP}"':'"${ES_NODEPORT}"'/_ilm/policy/sparse_log' -H 'Content-Type: application/json' -d '{ + "policy": { + "phases": { + "delete": { + "min_age": "7d", + "actions": { + "delete": {} + } + } + } + } +}' + +curl $PARAM -X PUT $PROTO'://'"${MASTER_IP}"':'"${ES_NODEPORT}"'/_template/sparse_log' -H 'Content-Type: application/json' -d '{ + "order": 0, + "index_patterns": [ + "sparse_log-*" + ], + "settings": { + "index": { + "number_of_shards": '""${NUM_SHARDS}""', + "number_of_replicas": '""${NUM_REPLICAS}""', + "refresh_interval": "1s", + "lifecycle": { + "name": "sparse_log" + } + } + }, + "mappings": { + "properties": { + "cluster": { + "type": "keyword" + }, + "namespace": { + "type": "keyword" + }, + "date": { + "type": "keyword" + }, + "targetType": { + "type": "keyword" + }, + "targetId": { + "type": "keyword" + }, + "unixtime": { + "type": "long" + }, + "logpath": { + "type": "text", + "index": false + }, + "contents": { + "type": "text" + }, + "lineNumber": { + "type": "integer" + }, + "probability": { + "type": "float" + }, + "subentityId": { + "type": "keyword" + } + } + }, + "aliases": { + "sparse_log": {} + } +}' + + + +# sparse_model +curl $PARAM -X PUT $PROTO'://'"${MASTER_IP}"':'"${ES_NODEPORT}"'/_template/sparse_model' -H 'Content-Type: application/json' -d '{ + "order": 0, + "index_patterns": [ + "sparse_model" + ], + "settings": { + "index": { + "number_of_shards": '""${NUM_SHARDS}""', + "number_of_replicas": '""${NUM_REPLICAS}""', + "refresh_interval": "1s" + } + }, + "mappings": { + "properties": { + "cluster": { + "type": "keyword" + }, + "namespace": { + "type": "keyword" + }, + "targetType": { + "type": "keyword" + }, + "targetId": { + "type": "keyword" + }, + "modifiedDate": { + "type": "long" + }, + "logPath": { + "type": "keyword" + }, + "savedModel": { + "type": "text", + "index": false + } + } + } +}' + + + +# kubernetes_pod_info +curl $PARAM -X PUT $PROTO'://'"${MASTER_IP}"':'"${ES_NODEPORT}"'/_ilm/policy/kubernetes_pod_info' -H 'Content-Type: application/json' -d '{ + "policy": { + "phases": { + "delete": { + "min_age": "7d", + "actions": { + "delete": {} + } + } + } + } +}' + +curl $PARAM -X PUT $PROTO'://'"${MASTER_IP}"':'"${ES_NODEPORT}"'/_template/kubernetes_pod_info' -H 'Content-Type: application/json' -d '{ +"order": 0, + "index_patterns": [ + "kubernetes_pod_info-*" + ], + "settings": { + "index": { + "number_of_shards": '""${NUM_SHARDS}""', + "number_of_replicas": '""${NUM_REPLICAS}""', + "refresh_interval": "1s", + "lifecycle": { + "name": "kubernetes_pod_info" + } + } + }, + "mappings": { + "properties": { + "eventType": {"type": "keyword"}, + "cluster": {"type": "keyword"}, + "namespace": {"type": "keyword"}, + "node": {"type": "keyword"}, + "pod": {"type": "keyword"}, + "podUID": {"type": "keyword"}, + "podCreationTimestamp": {"type": "long"}, + "podDeletionTimestamp": {"type": "long"}, + "podDeletionGracePeriod": {"type": "long"}, + "resourceVersion": {"type": "keyword"}, + "ownerKind": {"type": "keyword"}, + "ownerName": {"type": "keyword"}, + "ownerUID": {"type": "keyword"}, + "podPhase": {"type": "keyword"}, + "podIP": {"type": "keyword"}, + "podStartTime": {"type": "long"}, + "podReady": {"type": "boolean"}, + "podContainersReady": {"type": "boolean"}, + "isInitContainer": {"type": "boolean"}, + "containerName": {"type": "keyword"}, + "containerID": {"type": "keyword"}, + "containerImage": {"type": "keyword"}, + "containerImageShort": {"type": "keyword"}, + "containerReady": {"type": "boolean"}, + "containerRestartCount": {"type": "integer"}, + "containerState": {"type": "keyword"}, + "containerStartTime": {"type": "long"}, + "containerMessage": {"type": "keyword"}, + "containerReason": {"type": "keyword"}, + "containerFinishTime": {"type": "long"}, + "containerExitCode": {"type": "integer"}, + "containerLastState": {"type": "keyword"}, + "containerLastStartTime": {"type": "long"}, + "containerLastMessage": {"type": "keyword"}, + "containerLastReason": {"type": "keyword"}, + "containerLastFinishTime": {"type": "long"}, + "containerLastExitCode": {"type": "integer"} + } + }, + "aliases": { + "kubernetes_pod_info": {} + } +}' + + + +# kubernetes_pod_history +curl $PARAM -X PUT $PROTO'://'"${MASTER_IP}"':'"${ES_NODEPORT}"'/_ilm/policy/kubernetes_pod_history' -H 'Content-Type: application/json' -d '{ + "policy": { + "phases": { + "delete": { + "min_age": "1d", + "actions": { + "delete": {} + } + } + } + } +}' + +curl $PARAM -X PUT $PROTO'://'"${MASTER_IP}"':'"${ES_NODEPORT}"'/_template/kubernetes_pod_history' -H 'Content-Type: application/json' -d '{ + "order": 0, + "index_patterns": [ + "kubernetes_pod_history-*" + ], + "settings": { + "index": { + "number_of_shards": '""${NUM_SHARDS}""', + "number_of_replicas": '""${NUM_REPLICAS}""', + "refresh_interval": "1s", + "lifecycle": { + "name": "kubernetes_pod_history" + } + } + }, + "mappings": { + "properties": { + "deployName": { + "type": "keyword" + }, + "deployType": { + "type": "keyword" + }, + "deployDate": { + "type": "keyword" + }, + "namespace": { + "type": "keyword" + }, + "nodeId": { + "type": "keyword" + }, + "podId": { + "type": "keyword" + }, + "podPhase": { + "type": "keyword" + }, + "startTime": { + "type": "keyword" + }, + "endTime": { + "type": "keyword" + }, + "exitCode": { + "type": "integer" + }, + "reason": { + "type": "keyword" + }, + "message": { + "type": "text" + }, + "time": { + "type": "long" + }, + "containerId": { + "type": "keyword" + }, + "containerName": { + "type": "keyword" + }, + "containerPhase": { + "type": "keyword" + }, + "eventAction": { + "type": "keyword" + }, + "containerStartTime": { + "type": "keyword" + }, + "containerEndTime": { + "type": "keyword" + }, + "containerImage": { + "type": "keyword" + }, + "containerImageShort": { + "type": "keyword" + } + } + }, + "aliases": { + "kubernetes_pod_history": {} + } +}' + + + + +# metric_score +curl $PARAM -X PUT $PROTO'://'"${MASTER_IP}"':'"${ES_NODEPORT}"'/_ilm/policy/metric_score' -H 'Content-Type: application/json' -d '{ + "policy": { + "phases": { + "delete": { + "min_age": "7d", + "actions": { + "delete": {} + } + } + } + } +}' + +curl $PARAM -X PUT $PROTO'://'"${MASTER_IP}"':'"${ES_NODEPORT}"'/_template/metric_score' -H 'Content-Type: application/json' -d '{ + "order": 0, + "index_patterns": [ + "metric_score-*" + ], + "settings": { + "index": { + "number_of_shards": '""${NUM_SHARDS}""', + "number_of_replicas": '""${NUM_REPLICAS}""', + "refresh_interval": "1s", + "lifecycle": { + "name": "metric_score" + }, + "sort.field": "unixtime", + "sort.order": "desc" + } + }, + "mappings": { + "properties": { + "anomaly": { + "type": "boolean" + }, + "clstId": { + "type": "keyword" + }, + "contName": { + "type": "keyword" + }, + "namespace": { + "type": "keyword" + }, + "podId": { + "type": "keyword" + }, + "instance": { + "type": "keyword" + }, + "entityId": { + "type": "keyword" + }, + "entityType": { + "type": "keyword" + }, + "metricId": { + "type": "keyword" + }, + "nodeId": { + "type": "keyword" + }, + "score": { + "type": "integer" + }, + "subKey": { + "type": "keyword" + }, + "unixtime": { + "type": "long" + }, + "yhatLowerUpper": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + } + } + }, + "aliases": { + "metric_score": {} + } +}' + + + + +# entity_score +curl $PARAM -X PUT $PROTO'://'"${MASTER_IP}"':'"${ES_NODEPORT}"'/_ilm/policy/entity_score' -H 'Content-Type: application/json' -d '{ + "policy": { + "phases": { + "delete": { + "min_age": "7d", + "actions": { + "delete": {} + } + } + } + } +}' + +curl $PARAM -X PUT $PROTO'://'"${MASTER_IP}"':'"${ES_NODEPORT}"'/_template/entity_score' -H 'Content-Type: application/json' -d '{ + "order": 0, + "index_patterns": [ + "entity_score-*" + ], + "settings": { + "index": { + "number_of_shards": '""${NUM_SHARDS}""', + "number_of_replicas": '""${NUM_REPLICAS}""', + "refresh_interval": "1s", + "lifecycle": { + "name": "entity_score" + }, + "sort.field": "unixtime", + "sort.order": "desc" + } + }, + "mappings": { + "properties": { + "clstId": { + "type": "keyword" + }, + "contName": { + "type": "keyword" + }, + "namespace": { + "type": "keyword" + }, + "podId": { + "type": "keyword" + }, + "entityId": { + "type": "keyword" + }, + "entityType": { + "type": "keyword" + }, + "unixtime": { + "type": "long" + }, + "nodeId": { + "type": "keyword" + }, + "maxId": { + "type": "keyword" + }, + "maxScore": { + "type": "integer" + }, + "entityScore": { + "type": "integer" + } + } + }, + "aliases": { + "entity_score": {} + } +}' + + +# timeline_score +curl $PARAM -X PUT $PROTO'://'"${MASTER_IP}"':'"${ES_NODEPORT}"'/_ilm/policy/timeline_score' -H 'Content-Type: application/json' -d '{ + "policy": { + "phases": { + "delete": { + "min_age": "7d", + "actions": { + "delete": {} + } + } + } + } +}' + +curl $PARAM -X PUT $PROTO'://'"${MASTER_IP}"':'"${ES_NODEPORT}"'/_template/timeline_score' -H 'Content-Type: application/json' -d '{ + "order": 0, + "index_patterns": [ + "timeline_score-*" + ], + "settings": { + "index": { + "number_of_shards": '""${NUM_SHARDS}""', + "number_of_replicas": '""${NUM_REPLICAS}""', + "refresh_interval": "1s", + "lifecycle": { + "name": "timeline_score" + }, + "sort.field": "unixtime", + "sort.order": "desc" + } + }, + "mappings": { + "properties": { + "clstId": { + "type": "keyword" + }, + "namespace": { + "type": "keyword" + }, + "entityType": { + "type": "keyword" + }, + "criticalCount": { + "type": "integer" + }, + "warningCount": { + "type": "integer" + }, + "attentionCount": { + "type": "integer" + }, + "normalCount": { + "type": "integer" + }, + "unixtime": { + "type": "long" + } + } + }, + "aliases": { + "timeline_score": {} + } +}' + + + +# spaninfo +curl $PARAM -X PUT $PROTO'://'"${MASTER_IP}"':'"${ES_NODEPORT}"'/_ilm/policy/spaninfo' -H 'Content-Type: application/json' -d '{ + "policy": { + "phases": { + "delete": { + "min_age": "7d", + "actions": { + "delete": {} + } + } + } + } +}' + +curl $PARAM -X PUT $PROTO'://'"${MASTER_IP}"':'"${ES_NODEPORT}"'/_template/spaninfo' -H 'Content-Type: application/json' -d '{ + "order": 0, + "index_patterns": [ + "spaninfo-*" + ], + "settings": { + "index": { + "number_of_shards": '""${NUM_SHARDS}""', + "number_of_replicas": "0", + "refresh_interval": "1s", + "lifecycle": { + "name": "spaninfo" + } + } + }, + "mappings": { + "properties": { + "cluster": { + "type": "keyword" + }, + "namespace": { + "type": "keyword" + }, + "node": { + "type": "keyword" + }, + "service": { + "type": "keyword" + }, + "pod": { + "type": "keyword" + }, + "version": { + "type": "keyword" + }, + "ip": { + "type": "keyword" + }, + "traceId": { + "type": "keyword" + }, + "spanId": { + "type": "keyword" + }, + "parentSpanId": { + "type": "keyword" + }, + "protocolType": { + "type": "keyword" + }, + "startTime": { + "type": "long" + }, + "duration": { + "type": "long" + }, + "endTime": { + "type": "long" + }, + "operation": { + "type": "keyword" + }, + "spanKind": { + "type": "keyword" + }, + "component": { + "type": "keyword" + }, + "error": { + "type": "boolean" + }, + "peerAddress": { + "type": "keyword" + }, + "peerHostname": { + "type": "keyword" + }, + "peerIpv4": { + "type": "keyword" + }, + "peerIpv6": { + "type": "keyword" + }, + "peerPort": { + "type": "integer" + }, + "peerService": { + "type": "keyword" + }, + "samplingPriority": { + "type": "keyword" + }, + "httpStatusCode": { + "type": "integer" + }, + "httpUrl": { + "type": "keyword" + }, + "httpMethod": { + "type": "keyword" + }, + "httpApi": { + "type": "keyword" + }, + "dbInstance": { + "type": "keyword" + }, + "dbStatement": { + "type": "keyword" + }, + "dbType": { + "type": "keyword" + }, + "dbUser": { + "type": "keyword" + }, + "messagebusDestination": { + "type": "keyword" + }, + "logs": { + "dynamic": false, + "type": "nested", + "properties": { + "fields": { + "dynamic": false, + "type": "nested", + "properties": { + "value": { + "ignore_above": 256, + "type": "keyword" + }, + "key": { + "type": "keyword" + } + } + }, + "timestamp": { + "type": "long" + } + } + } + } + }, + "aliases": { + "spaninfo": {} + } +}' + + + +# sta_podinfo +curl $PARAM -X PUT $PROTO'://'"${MASTER_IP}"':'"${ES_NODEPORT}"'/_ilm/policy/sta_podinfo' -H 'Content-Type: application/json' -d '{ + "policy": { + "phases": { + "delete": { + "min_age": "7d", + "actions": { + "delete": {} + } + } + } + } +}}' + +curl $PARAM -X PUT $PROTO'://'"${MASTER_IP}"':'"${ES_NODEPORT}"'/_template/sta_podinfo' -H 'Content-Type: application/json' -d '{ + "order": 0, + "index_patterns": [ + "sta_podinfo-*" + ], + "settings": { + "index": { + "number_of_shards": '""${NUM_SHARDS}""', + "number_of_replicas": "0", + "refresh_interval": "1s", + "lifecycle": { + "name": "sta_podinfo" + } + } + }, + "mappings": { + "properties": { + "cluster": { + "type": "keyword" + }, + "namespace": { + "type": "keyword" + }, + "service": { + "type": "keyword" + }, + "pod": { + "type": "keyword" + }, + "timestamp": { + "type": "long" + }, + "version": { + "type": "keyword" + }, + "components": { + "type": "keyword", + "fields": { + "keyword": { + "type": "keyword" + } + } + } + } + }, + "aliases": { + "sta_podinfo": {} + } +}' + + +# sta_httpapi +curl $PARAM -X PUT $PROTO'://'"${MASTER_IP}"':'"${ES_NODEPORT}"'/_ilm/policy/sta_httpapi' -H 'Content-Type: application/json' -d '{ + "policy": { + "phases": { + "delete": { + "min_age": "1d", + "actions": { + "delete": {} + } + } + } + } +}' + +curl $PARAM -X PUT $PROTO'://'"${MASTER_IP}"':'"${ES_NODEPORT}"'/_template/sta_httpapi' -H 'Content-Type: application/json' -d '{ + "order": 0, + "index_patterns": [ + "sta_httpapi-*" + ], + "settings": { + "index": { + "number_of_shards": '""${NUM_SHARDS}""', + "number_of_replicas": "0", + "refresh_interval": "1s", + "lifecycle": { + "name": "sta_httpapi" + } + } + }, + "mappings": { + "properties": { + "cluster": { + "type": "keyword" + }, + "namespace": { + "type": "keyword" + }, + "service": { + "type": "keyword" + }, + "timestamp": { + "type": "long" + }, + "api": { + "type": "keyword" + } + } + }, + "aliases": { + "sta_httpapi": {} + } +}' + + + +# sta_httpsummary +curl $PARAM -X PUT $PROTO'://'"${MASTER_IP}"':'"${ES_NODEPORT}"'/_ilm/policy/sta_httpsummary' -H 'Content-Type: application/json' -d '{ + "policy": { + "phases": { + "delete": { + "min_age": "1d", + "actions": { + "delete": {} + } + } + } + } +}' + +curl $PARAM -X PUT $PROTO'://'"${MASTER_IP}"':'"${ES_NODEPORT}"'/_template/sta_httpsummary' -H 'Content-Type: application/json' -d '{ + "order": 0, + "index_patterns": [ + "sta_httpsummary-*" + ], + "settings": { + "index": { + "number_of_shards": '""${NUM_SHARDS}""', + "number_of_replicas": "0", + "refresh_interval": "1s", + "lifecycle": { + "name": "sta_httpsummary" + } + } + }, + "mappings": { + "properties": { + "cluster": { + "type": "keyword" + }, + "namespace": { + "type": "keyword" + }, + "timestamp": { + "type": "long" + }, + "pod": { + "type": "keyword" + }, + "service": { + "type": "keyword" + }, + "api": { + "type": "keyword" + }, + "countTotal": { + "type": "integer" + }, + "errorCountTotal": { + "type": "integer" + }, + "timeTotalMicrosec": { + "type": "integer" + }, + "methods": { + "type": "keyword", + "fields": { + "keyword": { + "type": "keyword" + } + } + }, + "statuses": { + "type": "integer", + "fields": { + "integer": { + "type": "integer" + } + } + } + } + }, + "aliases": { + "sta_httpsummary": {} + } +}' + + + +# sta_relation +curl $PARAM -X PUT $PROTO'://'"${MASTER_IP}"':'"${ES_NODEPORT}"'/_ilm/policy/sta_relation' -H 'Content-Type: application/json' -d '{ + "policy": { + "phases": { + "delete": { + "min_age": "1d", + "actions": { + "delete": {} + } + } + } + } +}' + +curl $PARAM -X PUT $PROTO'://'"${MASTER_IP}"':'"${ES_NODEPORT}"'/_template/sta_relation' -H 'Content-Type: application/json' -d '{ + "order": 0, + "index_patterns": [ + "sta_relation-*" + ], + "settings": { + "index": { + "number_of_shards": '""${NUM_SHARDS}""', + "number_of_replicas": "0", + "refresh_interval": "1s", + "lifecycle": { + "name": "sta_relation" + } + } + }, + "mappings": { + "properties": { + "cluster": { + "type": "keyword" + }, + "namespace": { + "type": "keyword" + }, + "timestamp": { + "type": "long" + }, + "parent": { + "type": "keyword" + }, + "children": { + "type": "nested", + "properties": { + "name": { + "type": "keyword" + }, + "count": { + "type": "integer" + } + } + } + } + }, + "aliases": { + "sta_relation": {} + } +}' + + + +# sta_externalrelation +curl $PARAM -X PUT $PROTO'://'"${MASTER_IP}"':'"${ES_NODEPORT}"'/_ilm/policy/sta_externalrelation' -H 'Content-Type: application/json' -d '{ + "policy": { + "phases": { + "delete": { + "min_age": "1d", + "actions": { + "delete": {} + } + } + } + } +}' + +curl $PARAM -X PUT $PROTO'://'"${MASTER_IP}"':'"${ES_NODEPORT}"'/_template/sta_externalrelation' -H 'Content-Type: application/json' -d '{ + "order": 0, + "index_patterns": [ + "sta_externalrelation-*" + ], + "settings": { + "index": { + "number_of_shards": '""${NUM_SHARDS}""', + "number_of_replicas": "0", + "refresh_interval": "1s", + "lifecycle": { + "name": "sta_externalrelation" + } + } + }, + "mappings": { + "properties": { + "cluster": { + "type": "keyword" + }, + "namespace": { + "type": "keyword" + }, + "timestamp": { + "type": "long" + }, + "externalNamespace": { + "type": "keyword" + }, + "externalService": { + "type": "keyword" + } + } + }, + "aliases": { + "sta_externalrelation": {} + } +}' + + + +# sta_traceinfo +curl $PARAM -X PUT $PROTO'://'"${MASTER_IP}"':'"${ES_NODEPORT}"'/_ilm/policy/sta_traceinfo' -H 'Content-Type: application/json' -d '{ + "policy": { + "phases": { + "delete": { + "min_age": "7d", + "actions": { + "delete": {} + } + } + } + } +}' + +curl $PARAM -X PUT $PROTO'://'"${MASTER_IP}"':'"${ES_NODEPORT}"'/_template/sta_traceinfo' -H 'Content-Type: application/json' -d '{ + "order": 0, + "index_patterns": [ + "sta_traceinfo-*" + ], + "settings": { + "index": { + "number_of_shards": '""${NUM_SHARDS}""', + "number_of_replicas": "0", + "refresh_interval": "1s", + "lifecycle": { + "name": "sta_traceinfo" + } + } + }, + "mappings": { + "properties": { + "cluster": { + "type": "keyword" + }, + "namespace": { + "type": "keyword" + }, + "traceId": { + "type": "keyword" + }, + "serviceName": { + "type": "keyword" + }, + "operationName": { + "type": "keyword" + }, + "spanSize": { + "type": "integer" + }, + "relatedServices": { + "type": "keyword", + "fields": { + "keyword": { + "type": "keyword" + } + } + }, + "startTime": { + "type": "long" + }, + "endTime": { + "type": "long" + }, + "duration": { + "type": "long" + }, + "error": { + "type": "boolean" + } + } + }, + "aliases": { + "sta_traceinfo": {} + } +}' + + + +# sta_tracetrend +curl $PARAM -X PUT $PROTO'://'"${MASTER_IP}"':'"${ES_NODEPORT}"'/_ilm/policy/sta_tracetrend' -H 'Content-Type: application/json' -d '{ + "policy": { + "phases": { + "delete": { + "min_age": "7d", + "actions": { + "delete": {} + } + } + } + } +}' + +curl $PARAM -X PUT $PROTO'://'"${MASTER_IP}"':'"${ES_NODEPORT}"'/_template/sta_tracetrend' -H 'Content-Type: application/json' -d '{ + "order": 0, + "index_patterns": [ + "sta_tracetrend-*" + ], + "settings": { + "index": { + "number_of_shards": '""${NUM_SHARDS}""', + "number_of_replicas": "0", + "refresh_interval": "1s", + "lifecycle": { + "name": "sta_tracetrend" + } + } + }, + "mappings": { + "properties": { + "cluster": { + "type": "keyword" + }, + "namespace": { + "type": "keyword" + }, + "serviceName": { + "type": "keyword" + }, + "endTimeGTE": { + "type": "long" + }, + "endTimeLT": { + "type": "long" + } + }, + "dynamic_templates": [ + { + "totals": { + "match": "total*", + "mapping": {"type": "integer"} + } + }, + { + "errors": { + "match": "error*", + "mapping": {"type": "integer"} + } + } + ] + }, + "aliases": { + "sta_tracetrend": {} + } +}' + +# script_history +curl $PARAM -X PUT $PROTO'://'"${MASTER_IP}"':'"${ES_NODEPORT}"'/_ilm/policy/script_history' -H 'Content-Type: application/json' -d '{ + "policy": { + "phases": { + "delete": { + "min_age": "7d", + "actions": { + "delete": {} + } + } + } + } +}' + + + +curl $PARAM -X PUT $PROTO'://'"${MASTER_IP}"':'"${ES_NODEPORT}"'/_template/script_history' -H 'Content-Type: application/json' -d '{ + "order": 0, + "index_patterns": [ + "script_history-*" + ], + "settings": { + "index": { + "number_of_shards": '""${NUM_SHARDS}""', + "number_of_replicas": '""${NUM_REPLICAS}""', + "refresh_interval": "1s", + "lifecycle": { + "name": "script_history" + } + } + }, + "mappings": { + "properties": { + "taskId": { + "type": "long" + }, + "scriptName": { + "type": "keyword" + }, + "agentName": { + "type": "keyword" + }, + "targetFile": { + "type": "keyword" + }, + "args": { + "type": "keyword", + "fields": { + "keyword": { + "type": "keyword" + } + } + }, + "validCmd": { + "type": "keyword" + }, + "validVal": { + "type": "keyword" + }, + "valid": { + "type": "boolean" + }, + "validResult": { + "type": "keyword" + }, + "cronExp": { + "type": "keyword" + }, + "createUser": { + "type": "keyword" + }, + "startTime": { + "type": "long" + }, + "endTime": { + "type": "long" + }, + "error": { + "type": "boolean" + }, + "result": { + "type": "keyword" + }, + "order": { + "type": "keyword" + }, + "mtime": { + "type": "keyword" + } + } + }, + "aliases": { + "script_history": {} + } +}' + + +# kubernetes_audit_log +curl $PARAM -X PUT $PROTO'://'"${MASTER_IP}"':'"${ES_NODEPORT}"'/_ilm/policy/kubernetes_audit_log' -H 'Content-Type: application/json' -d '{ + "policy": { + "phases": { + "delete": { + "min_age": "7d", + "actions": { + "delete": {} + } + } + } + } +}' + +curl $PARAM -X PUT $PROTO'://'"${MASTER_IP}"':'"${ES_NODEPORT}"'/_template/kubernetes_audit_log' -H 'Content-Type: application/json' -d '{ + "order": 0, + "index_patterns": [ + "kubernetes_audit_log-*" + ], + "settings": { + "index": { + "number_of_shards": '""${NUM_SHARDS}""', + "number_of_replicas": "1", + "refresh_interval": "1s", + "lifecycle": { + "name": "kubernetes_audit_log" + }, + "sort.field": "stageTimestamp", + "sort.order": "desc" + } + }, + "mappings": { + "properties": { + "verb": { + "type": "keyword" + }, + "userName": { + "type": "keyword" + }, + "sourceIps": { + "type": "keyword" + }, + "resource": { + "type": "keyword" + }, + "code": { + "type": "keyword" + }, + "requestReceivedTimestamp": { + "type": "long" + }, + "stageTimestamp": { + "type": "long" + }, + "durationTimestamp": { + "type": "long" + }, + "data": { + "type": "text", + "index": false + } + } + }, + "aliases": { + "kubernetes_audit_log": {} + } +}' + +# license_history +curl $PARAM -X PUT $PROTO'://'"${MASTER_IP}"':'"${ES_NODEPORT}"'/_ilm/policy/license_history' -H 'Content-Type: application/json' -d '{ + "policy": { + "phases": { + "delete": { + "min_age": "90d", + "actions": { + "delete": {} + } + } + } + } +}' + +curl $PARAM -X PUT $PROTO'://'"${MASTER_IP}"':'"${ES_NODEPORT}"'/_template/license_history' -H 'Content-Type: application/json' -d '{ + "order": 0, + "index_patterns": [ + "license_history-*" + ], + "settings": { + "index": { + "number_of_shards": "2", + "number_of_replicas": "1", + "refresh_interval": "1s", + "lifecycle": { + "name": "license_history" + }, + "sort.field": "checkTime", + "sort.order": "desc" + } + }, + "mappings": { + "properties": { + "licenseType": { + "type": "integer" + }, + "expireDate": { + "type": "text" + }, + "targetNodesCount": { + "type": "integer" + }, + "realNodesCount": { + "type": "integer" + }, + "targetPodsCount": { + "type": "integer" + }, + "realPodsCount": { + "type": "integer" + }, + "targetSvcsCount": { + "type": "integer" + }, + "realSvcsCount": { + "type": "integer" + }, + "targetCoreCount": { + "type": "integer" + }, + "realCoreCount": { + "type": "integer" + }, + "allowableRange": { + "type": "integer" + }, + "licenseClusterId": { + "type": "keyword" + }, + "tenantId": { + "type": "keyword" + }, + "checkTime": { + "type": "date", + "format": "epoch_millis" + }, + "checkResult": { + "type": "integer" + } + } + }, + "aliases": { + "license_history": {} + } +}' + +# alert_event_history +curl $PARAM -X PUT $PROTO'://'"${MASTER_IP}"':'"${ES_NODEPORT}"'/_ilm/policy/alert_event_history' -H 'Content-Type: application/json' -d '{ + "policy": { + "phases": { + "delete": { + "min_age": "7d", + "actions": { + "delete": {} + } + } + } + } +}' + +curl $PARAM -X PUT $PROTO'://'"${MASTER_IP}"':'"${ES_NODEPORT}"'/_template/alert_event_history' -H 'Content-Type: application/json' -d '{ + "order": 0, + "index_patterns": [ + "alert_event_history-*" + ], + "settings": { + "index": { + "number_of_shards": '""${NUM_SHARDS}""', + "number_of_replicas": '""${NUM_REPLICAS}""', + "refresh_interval": "1s", + "lifecycle": { + "name": "alert_event_history" + } + } + }, + "mappings": { + "properties": { + "alertName": { + "type": "keyword" + }, + "clusterId": { + "type": "keyword" + }, + "data": { + "type": "text", + "index": false + }, + "entityId": { + "type": "keyword" + }, + "entityType": { + "type": "keyword" + }, + "level": { + "type": "keyword" + }, + "metaId": { + "type": "keyword" + }, + "namespace": { + "type": "keyword" + }, + "startsAt": { + "type": "long" + }, + "threshold": { + "type": "double" + }, + "value": { + "type": "double" + }, + "message": { + "type": "keyword" + }, + "endsAt": { + "type": "long" + }, + "status": { + "type": "keyword" + }, + "hookCollectAt": { + "type": "long" + } + } + }, + "aliases": { + "alert_event_history": {} + } +}' + +# JSPD ilm +curl $PARAM -X PUT $PROTO'://'"${MASTER_IP}"':'"${ES_NODEPORT}"'/_ilm/policy/jspd_ilm' -H 'Content-Type: application/json' -d '{ + "policy": { + "phases": { + "delete": { + "min_age": "1d", + "actions": { + "delete": {} + } + } + } + } +}' + +# jspd_lite-activetxn +curl $PARAM -X PUT $PROTO'://'"${MASTER_IP}"':'"${ES_NODEPORT}"'/_template/jspd_lite-activetxn' -H 'Content-Type: application/json' -d '{ + "order": 0, + "index_patterns": [ + "jspd_lite-activetxn-*" + ], + "settings": { + "index": { + "number_of_shards": '""${NUM_SHARDS}""', + "number_of_replicas": '""${NUM_REPLICAS}""', + "refresh_interval": "1s", + "lifecycle": { + "name": "jspd_ilm" + } + } + }, + "mappings": { + "properties": { + "server_uuid": { + "type": "keyword" + }, + "time": { + "type": "long" + }, + "cluster": { + "type": "keyword" + }, + "namespace": { + "type": "keyword" + }, + "node": { + "type": "keyword" + }, + "service": { + "type": "keyword" + }, + "pod": { + "type": "keyword" + }, + "start_time": { + "type": "long" + }, + "tid": { + "type": "keyword" + }, + "txn_name": { + "type": "text", + "fields": { + "keyword": { + "ignore_above": 256, + "type": "keyword" + } + } + }, + "cpu_time": { + "type": "integer" + }, + "memory_usage": { + "type": "integer" + }, + "web_id": { + "type": "integer" + }, + "prepare_count": { + "type": "integer" + }, + "sql_exec_count": { + "type": "integer" + }, + "fetch_count": { + "type": "integer" + }, + "active_sql_elapse_time": { + "type": "integer" + }, + "db_id": { + "type": "integer" + }, + "sql_text": { + "type": "text", + "fields": { + "keyword": { + "ignore_above": 102400, + "type": "keyword" + } + } + }, + "thread_id": { + "type": "long" + }, + "state": { + "type": "short" + }, + "method_id": { + "type": "integer" + }, + "method_seq": { + "type": "integer" + }, + "stack_crc": { + "type": "integer" + }, + "thread_memory_usage": { + "type": "integer" + }, + "http_method": { + "type": "keyword" + } + } + }, + "aliases": { + "jspd_lite-activetxn": {} + } +}' + +# jspd_lite-alert +curl $PARAM -X PUT $PROTO'://'"${MASTER_IP}"':'"${ES_NODEPORT}"'/_template/jspd_lite-alert' -H 'Content-Type: application/json' -d '{ + "order": 0, + "index_patterns": [ + "jspd_lite-alert-*" + ], + "settings": { + "index": { + "number_of_shards": '""${NUM_SHARDS}""', + "number_of_replicas": '""${NUM_REPLICAS}""', + "refresh_interval": "1s", + "lifecycle": { + "name": "jspd_ilm" + } + } + }, + "mappings": { + "properties": { + "server_uuid": { + "type": "keyword" + }, + "time": { + "type": "long" + }, + "cluster": { + "type": "keyword" + }, + "namespace": { + "type": "keyword" + }, + "node": { + "type": "keyword" + }, + "service": { + "type": "keyword" + }, + "pod": { + "type": "keyword" + }, + "name": { + "type": "keyword" + }, + "status": { + "type": "short" + }, + "value": { + "type": "integer" + }, + "pid": { + "type": "integer" + } + } + }, + "aliases": { + "jspd_lite-alert": {} + } +}' + +# jspd_lite-e2einfo +curl $PARAM -X PUT $PROTO'://'"${MASTER_IP}"':'"${ES_NODEPORT}"'/_template/jspd_lite-e2einfo' -H 'Content-Type: application/json' -d '{ + "order": 0, + "index_patterns": [ + "jspd_lite-e2einfo-*" + ], + "settings": { + "index": { + "number_of_shards": '""${NUM_SHARDS}""', + "number_of_replicas": '""${NUM_REPLICAS}""', + "refresh_interval": "1s", + "lifecycle": { + "name": "jspd_ilm" + } + } + }, + "mappings": { + "properties": { + "server_uuid": { + "type": "keyword" + }, + "time": { + "type": "long" + }, + "cluster": { + "type": "keyword" + }, + "namespace": { + "type": "keyword" + }, + "node": { + "type": "keyword" + }, + "service": { + "type": "keyword" + }, + "pod": { + "type": "keyword" + }, + "root_tid": { + "type": "keyword" + }, + "tid": { + "type": "keyword" + }, + "e2e_info_type": { + "type": "short" + }, + "e2e_key": { + "type": "keyword" + }, + "elapse_time": { + "type": "integer" + }, + "dest_url": { + "type": "keyword" + } + } + }, + "aliases": { + "jspd_lite-e2einfo": {} + } +}' + +# jspd_lite-methodname +curl $PARAM -X PUT $PROTO'://'"${MASTER_IP}"':'"${ES_NODEPORT}"'/_template/jspd_lite-methodname' -H 'Content-Type: application/json' -d '{ + "order": 0, + "index_patterns": [ + "jspd_lite-methodname-*" + ], + "settings": { + "index": { + "number_of_shards": '""${NUM_SHARDS}""', + "number_of_replicas": '""${NUM_REPLICAS}""', + "refresh_interval": "1s", + "lifecycle": { + "name": "jspd_ilm" + } + } + }, + "mappings": { + "properties": { + "server_uuid": { + "type": "keyword" + }, + "time": { + "type": "long" + }, + "cluster": { + "type": "keyword" + }, + "namespace": { + "type": "keyword" + }, + "node": { + "type": "keyword" + }, + "service": { + "type": "keyword" + }, + "pod": { + "type": "keyword" + }, + "method_id": { + "type": "integer" + }, + "class_name": { + "type": "text", + "fields": { + "keyword": { + "ignore_above": 256, + "type": "keyword" + } + } + }, + "method_name": { + "type": "text", + "fields": { + "keyword": { + "ignore_above": 256, + "type": "keyword" + } + } + } + } + }, + "aliases": { + "jspd_lite-methodname": {} + } +}' + +# jspd_lite-sqldbinfo +curl $PARAM -X PUT $PROTO'://'"${MASTER_IP}"':'"${ES_NODEPORT}"'/_template/jspd_lite-sqldbinfo' -H 'Content-Type: application/json' -d '{ + "order": 0, + "index_patterns": [ + "jspd_lite-sqldbinfo-*" + ], + "settings": { + "index": { + "number_of_shards": '""${NUM_SHARDS}""', + "number_of_replicas": '""${NUM_REPLICAS}""', + "refresh_interval": "1s", + "lifecycle": { + "name": "jspd_ilm" + } + } + }, + "mappings": { + "properties": { + "server_uuid": { + "type": "keyword" + }, + "time": { + "type": "long" + }, + "cluster": { + "type": "keyword" + }, + "namespace": { + "type": "keyword" + }, + "node": { + "type": "keyword" + }, + "service": { + "type": "keyword" + }, + "pod": { + "type": "keyword" + }, + "db_id": { + "type": "integer" + }, + "url": { + "type": "keyword" + } + } + }, + "aliases": { + "jspd_lite-sqldbinfo": {} + } +}' + +# jspd_lite-txninfo +curl $PARAM -X PUT $PROTO'://'"${MASTER_IP}"':'"${ES_NODEPORT}"'/_template/jspd_lite-txninfo' -H 'Content-Type: application/json' -d '{ + "order": 0, + "index_patterns": [ + "jspd_lite-txninfo-*" + ], + "settings": { + "index": { + "number_of_shards": '""${NUM_SHARDS}""', + "number_of_replicas": '""${NUM_REPLICAS}""', + "refresh_interval": "1s", + "lifecycle": { + "name": "jspd_ilm" + } + } + }, + "mappings": { + "properties": { + "server_uuid": { + "type": "keyword" + }, + "time": { + "type": "long" + }, + "cluster": { + "type": "keyword" + }, + "namespace": { + "type": "keyword" + }, + "node": { + "type": "keyword" + }, + "service": { + "type": "keyword" + }, + "pod": { + "type": "keyword" + }, + "start_time": { + "type": "long" + }, + "end_time": { + "type": "long" + }, + "tid": { + "type": "keyword" + }, + "txn_name": { + "type": "keyword" + }, + "client_ip": { + "type": "keyword" + }, + "exception": { + "type": "short" + }, + "thread_cpu_time": { + "type": "integer" + }, + "thread_memory_usage": { + "type": "integer" + }, + "web_id": { + "type": "integer" + }, + "open_conn": { + "type": "integer" + }, + "close_conn": { + "type": "integer" + }, + "open_stmt": { + "type": "integer" + }, + "close_stmt": { + "type": "integer" + }, + "open_rs": { + "type": "integer" + }, + "close_rs": { + "type": "integer" + }, + "prepare_count": { + "type": "integer" + }, + "sql_execute_count": { + "type": "integer" + }, + "sql_elapse_time": { + "type": "integer" + }, + "sql_elapse_max": { + "type": "integer" + }, + "fetch_count": { + "type": "integer" + }, + "fetch_time": { + "type": "integer" + }, + "internal_fetch_count": { + "type": "integer" + }, + "txn_flag": { + "type": "integer" + }, + "http_method": { + "type": "keyword" + }, + "http_status": { + "type": "integer" + }, + "duration": { + "type": "long" + } + } + }, + "aliases": { + "jspd_lite-txninfo": {} + } +}' + +# jspd_lite-txnmethod +curl $PARAM -X PUT $PROTO'://'"${MASTER_IP}"':'"${ES_NODEPORT}"'/_template/jspd_lite-txnmethod' -H 'Content-Type: application/json' -d '{ + "order": 0, + "index_patterns": [ + "jspd_lite-txnmethod-*" + ], + "settings": { + "index": { + "number_of_shards": '""${NUM_SHARDS}""', + "number_of_replicas": '""${NUM_REPLICAS}""', + "refresh_interval": "1s", + "lifecycle": { + "name": "jspd_ilm" + } + } + }, + "mappings": { + "properties": { + "server_uuid": { + "type": "keyword" + }, + "time": { + "type": "long" + }, + "cluster": { + "type": "keyword" + }, + "namespace": { + "type": "keyword" + }, + "node": { + "type": "keyword" + }, + "service": { + "type": "keyword" + }, + "pod": { + "type": "keyword" + }, + "tid": { + "type": "keyword" + }, + "method_seq": { + "type": "integer" + }, + "method_id": { + "type": "integer" + }, + "calling_method_id": { + "type": "integer" + }, + "stack_crc32": { + "type": "integer" + }, + "calling_stack_crc32": { + "type": "integer" + }, + "elapse_time": { + "type": "integer" + }, + "exec_count": { + "type": "integer" + }, + "error_count": { + "type": "integer" + }, + "cpu_time": { + "type": "integer" + }, + "memory": { + "type": "integer" + }, + "start_time": { + "type": "long" + }, + "method_depth": { + "type": "integer" + }, + "exception": { + "type": "text", + "fields": { + "keyword": { + "ignore_above": 32768, + "type": "keyword" + } + } + } + } + }, + "aliases": { + "jspd_lite-txnmethod": {} + } +}' + +# jspd_lite-txnsql +curl $PARAM -X PUT $PROTO'://'"${MASTER_IP}"':'"${ES_NODEPORT}"'/_template/jspd_lite-txnsql' -H 'Content-Type: application/json' -d '{ + "order": 0, + "index_patterns": [ + "jspd_lite-txnsql-*" + ], + "settings": { + "index": { + "number_of_shards": '""${NUM_SHARDS}""', + "number_of_replicas": '""${NUM_REPLICAS}""', + "refresh_interval": "1s", + "lifecycle": { + "name": "jspd_ilm" + } + } + }, + "mappings": { + "properties": { + "server_uuid": { + "type": "keyword" + }, + "time": { + "type": "long" + }, + "cluster": { + "type": "keyword" + }, + "namespace": { + "type": "keyword" + }, + "node": { + "type": "keyword" + }, + "service": { + "type": "keyword" + }, + "pod": { + "type": "keyword" + }, + "tid": { + "type": "keyword" + }, + "db_id": { + "type": "integer" + }, + "cursor_id": { + "type": "integer" + }, + "sql_text": { + "type": "text", + "fields": { + "keyword": { + "ignore_above": 102400, + "type": "keyword" + } + } + }, + "method_id": { + "type": "integer" + }, + "execute_count": { + "type": "integer" + }, + "elapsed_time": { + "type": "integer" + }, + "elapsed_time_max": { + "type": "integer" + }, + "fetch_count": { + "type": "integer" + }, + "fetch_time": { + "type": "integer" + }, + "fetch_time_max": { + "type": "integer" + }, + "internal_fetch_count": { + "type": "integer" + } + } + }, + "aliases": { + "jspd_lite-txnsql": {} + } +}' + +# jspd_lite-wasstat +curl $PARAM -X PUT $PROTO'://'"${MASTER_IP}"':'"${ES_NODEPORT}"'/_template/jspd_lite-wasstat' -H 'Content-Type: application/json' -d '{ + "order": 0, + "index_patterns": [ + "jspd_lite-wasstat-*" + ], + "settings": { + "index": { + "number_of_shards": '""${NUM_SHARDS}""', + "number_of_replicas": '""${NUM_REPLICAS}""', + "refresh_interval": "1s", + "lifecycle": { + "name": "jspd_ilm" + } + } + }, + "mappings": { + "properties": { + "server_uuid": { + "type": "keyword" + }, + "time": { + "type": "long" + }, + "cluster": { + "type": "keyword" + }, + "namespace": { + "type": "keyword" + }, + "node": { + "type": "keyword" + }, + "service": { + "type": "keyword" + }, + "pod": { + "type": "keyword" + }, + "active_txns": { + "type": "integer" + }, + "sql_exec_count": { + "type": "long" + }, + "sql_prepare_count": { + "type": "long" + }, + "sql_fetch_count": { + "type": "long" + }, + "txn_end_count": { + "type": "long" + }, + "open_file_count": { + "type": "integer" + }, + "close_file_count": { + "type": "integer" + }, + "open_socket_count": { + "type": "integer" + }, + "close_socket_count": { + "type": "integer" + }, + "txn_elapse": { + "type": "long" + }, + "sql_elapse": { + "type": "long" + }, + "txn_elapse_max": { + "type": "long" + }, + "sql_elapse_max": { + "type": "long" + }, + "txn_error_count": { + "type": "integer" + } + } + }, + "aliases": { + "jspd_lite-wasstat": {} + } +}' + +# jspd_tta-externalrelation +curl $PARAM -X PUT $PROTO'://'"${MASTER_IP}"':'"${ES_NODEPORT}"'/_template/jspd_tta-externalrelation' -H 'Content-Type: application/json' -d '{ + "order": 0, + "index_patterns": [ + "jspd_tta-externalrelation-*" + ], + "settings": { + "index": { + "number_of_shards": '""${NUM_SHARDS}""', + "number_of_replicas": '""${NUM_REPLICAS}""', + "refresh_interval": "1s", + "lifecycle": { + "name": "jspd_ilm" + } + } + }, + "mappings": { + "properties": { + "cluster": { + "type": "keyword" + }, + "namespace": { + "type": "keyword" + }, + "time": { + "type": "long" + }, + "external_namespace": { + "type": "keyword" + }, + "external_service": { + "type": "keyword" + } + } + }, + "aliases": { + "jspd_tta-externalrelation": {} + } +}' + +# jspd_tta-relation +curl $PARAM -X PUT $PROTO'://'"${MASTER_IP}"':'"${ES_NODEPORT}"'/_template/jspd_tta-relation' -H 'Content-Type: application/json' -d '{ + "order": 0, + "index_patterns": [ + "jspd_tta-relation-*" + ], + "settings": { + "index": { + "number_of_shards": '""${NUM_SHARDS}""', + "number_of_replicas": '""${NUM_REPLICAS}""', + "refresh_interval": "1s", + "lifecycle": { + "name": "jspd_ilm" + } + } + }, + "mappings": { + "properties": { + "cluster": { + "type": "keyword" + }, + "namespace": { + "type": "keyword" + }, + "time": { + "type": "long" + }, + "from_service": { + "type": "keyword" + }, + "to_service": { + "type": "keyword" + }, + "count": { + "type": "integer" + } + } + }, + "aliases": { + "jspd_tta-relation": {} + } +}' + +# jspd_tta-txnlist +curl $PARAM -X PUT $PROTO'://'"${MASTER_IP}"':'"${ES_NODEPORT}"'/_template/jspd_tta-txnlist' -H 'Content-Type: application/json' -d '{ + "order": 0, + "index_patterns": [ + "jspd_tta-txnlist-*" + ], + "settings": { + "index": { + "number_of_shards": '""${NUM_SHARDS}""', + "number_of_replicas": '""${NUM_REPLICAS}""', + "refresh_interval": "1s", + "lifecycle": { + "name": "jspd_ilm" + } + } + }, + "mappings": { + "properties": { + "cluster": { + "type": "keyword" + }, + "namespace": { + "type": "keyword" + }, + "service": { + "type": "keyword" + }, + "pod": { + "type": "keyword" + }, + "time": { + "type": "long" + }, + "txn_name": { + "type": "keyword" + } + } + }, + "aliases": { + "jspd_tta-txnlist": {} + } +}' + +# jspd_tta-txnsummary +curl $PARAM -X PUT $PROTO'://'"${MASTER_IP}"':'"${ES_NODEPORT}"'/_template/jspd_tta-txnsummary' -H 'Content-Type: application/json' -d '{ + "order": 0, + "index_patterns": [ + "jspd_tta-txnsummary-*" + ], + "settings": { + "index": { + "number_of_shards": '""${NUM_SHARDS}""', + "number_of_replicas": '""${NUM_REPLICAS}""', + "refresh_interval": "1s", + "lifecycle": { + "name": "jspd_ilm" + } + } + }, + "mappings": { + "properties": { + "cluster": { + "type": "keyword" + }, + "namespace": { + "type": "keyword" + }, + "service": { + "type": "keyword" + }, + "pod": { + "type": "keyword" + }, + "time": { + "type": "long" + }, + "txn_name": { + "type": "keyword" + }, + "req_count": { + "type": "integer" + }, + "resp_count": { + "type": "integer" + }, + "total_duration": { + "type": "long" + }, + "failed": { + "type": "integer" + }, + "http_methods": { + "type": "keyword", + "fields": { + "keyword": { + "type": "keyword" + } + } + }, + "http_statuses": { + "type": "integer", + "fields": { + "integer": { + "type": "integer" + } + } + } + } + }, + "aliases": { + "jspd_tta-txnsummary": {} + } +}' + +# jspd_tta-txntrend +curl $PARAM -X PUT $PROTO'://'"${MASTER_IP}"':'"${ES_NODEPORT}"'/_template/jspd_tta-txntrend' -H 'Content-Type: application/json' -d '{ + "order": 0, + "index_patterns": [ + "jspd_tta-txntrend-*" + ], + "settings": { + "index": { + "number_of_shards": '""${NUM_SHARDS}""', + "number_of_replicas": '""${NUM_REPLICAS}""', + "refresh_interval": "1s", + "lifecycle": { + "name": "jspd_ilm" + } + } + }, + "mappings": { + "properties": { + "server_uuid": { + "type": "keyword" + }, + "time": { + "type": "long" + }, + "cluster": { + "type": "keyword" + }, + "namespace": { + "type": "keyword" + }, + "service": { + "type": "keyword" + }, + "pod": { + "type": "keyword" + }, + "endTimeGTE": { + "type": "long" + }, + "endTimeLT": { + "type": "long" + } + }, + "dynamic_templates": [ + { + "totals": { + "match": "total*", + "mapping": { + "type": "integer" + } + } + }, + { + "errors": { + "match": "error*", + "mapping": { + "type": "integer" + } + } + } + ] + }, + "aliases": { + "jspd_tta-txntrend": {} + } +}' + +curl $PARAM -X PUT $PROTO'://'"${MASTER_IP}"':'"${ES_NODEPORT}"'/_ilm/policy/maximum_metrics' -H 'Content-Type: application/json' -d '{ + "policy": { + "phases": { + "delete": { + "min_age": "5d", + "actions": { + "delete": {} + } + } + } + } +}' + +curl $PARAM -X PUT $PROTO'://'"${MASTER_IP}"':'"${ES_NODEPORT}"'/_template/maximum_metrics' -H 'Content-Type: application/json' -d '{ + "order": 0, + "index_patterns": [ + "maximum_metrics" + ], + "settings": { + "index": { + "number_of_shards": '""${NUM_SHARDS}""', + "number_of_replicas": '""${NUM_REPLICAS}""', + "refresh_interval": "1s", + "lifecycle": { + "name": "maximum_metrics" + }, + "sort.field": "date", + "sort.order": "desc" + } + }, + "mappings": { + "properties": { + "kind": { + "type": "keyword" + }, + "cluster": { + "type": "keyword" + }, + "namespace": { + "type": "keyword" + }, + "entity": { + "type": "keyword" + }, + "maximum": { + "type": "float" + }, + "date": { + "type": "date", + "format": "yyyy-MM-dd" + } + } + } +}' +