From ae663cc272cb8e01e447e1f97290be3ae4e7b438 Mon Sep 17 00:00:00 2001 From: EKbfh Date: Tue, 20 Jul 2021 22:52:23 +0300 Subject: [PATCH 1/3] Remove old dictionary files --- .../files/administrativedomain.xml.ctmpl | 42 ------- .../clickhouse/files/alarmclass.xml.ctmpl | 36 ------ .../clickhouse/files/container.xml.ctmpl | 48 -------- .../clickhouse/files/cpe.xml.ctmpl | 115 ------------------ .../files/interfaceattributes.xml.ctmpl | 55 --------- .../files/interfacedescription.xml.ctmpl | 37 ------ .../files/interfaceprofile.xml.ctmpl | 42 ------- .../clickhouse/files/managedobject.xml.ctmpl | 90 -------------- .../clickhouse/files/networksegment.xml.ctmpl | 42 ------- .../clickhouse/files/objectprofile.xml.ctmpl | 60 --------- .../clickhouse/files/platform.xml.ctmpl | 48 -------- .../clickhouse/files/pool.xml.ctmpl | 36 ------ .../clickhouse/files/profile.xml.ctmpl | 36 ------ .../clickhouse/files/serviceprofile.xml.ctmpl | 48 -------- .../clickhouse/files/state.xml.ctmpl | 54 -------- .../files/subscriberprofile.xml.ctmpl | 48 -------- .../clickhouse/files/vendor.xml.ctmpl | 36 ------ .../clickhouse/files/version.xml.ctmpl | 48 -------- .../clickhouse/files/workflow.xml.ctmpl | 42 ------- .../system_roles/clickhouse/tasks/main.yml | 14 --- .../clickhouse/templates/config.xml | 1 - 21 files changed, 978 deletions(-) delete mode 100644 ansible/system_roles/clickhouse/files/administrativedomain.xml.ctmpl delete mode 100644 ansible/system_roles/clickhouse/files/alarmclass.xml.ctmpl delete mode 100644 ansible/system_roles/clickhouse/files/container.xml.ctmpl delete mode 100644 ansible/system_roles/clickhouse/files/cpe.xml.ctmpl delete mode 100644 ansible/system_roles/clickhouse/files/interfaceattributes.xml.ctmpl delete mode 100644 ansible/system_roles/clickhouse/files/interfacedescription.xml.ctmpl delete mode 100644 ansible/system_roles/clickhouse/files/interfaceprofile.xml.ctmpl delete mode 100644 ansible/system_roles/clickhouse/files/managedobject.xml.ctmpl delete mode 100644 ansible/system_roles/clickhouse/files/networksegment.xml.ctmpl delete mode 100644 ansible/system_roles/clickhouse/files/objectprofile.xml.ctmpl delete mode 100644 ansible/system_roles/clickhouse/files/platform.xml.ctmpl delete mode 100644 ansible/system_roles/clickhouse/files/pool.xml.ctmpl delete mode 100644 ansible/system_roles/clickhouse/files/profile.xml.ctmpl delete mode 100644 ansible/system_roles/clickhouse/files/serviceprofile.xml.ctmpl delete mode 100644 ansible/system_roles/clickhouse/files/state.xml.ctmpl delete mode 100644 ansible/system_roles/clickhouse/files/subscriberprofile.xml.ctmpl delete mode 100644 ansible/system_roles/clickhouse/files/vendor.xml.ctmpl delete mode 100644 ansible/system_roles/clickhouse/files/version.xml.ctmpl delete mode 100644 ansible/system_roles/clickhouse/files/workflow.xml.ctmpl diff --git a/ansible/system_roles/clickhouse/files/administrativedomain.xml.ctmpl b/ansible/system_roles/clickhouse/files/administrativedomain.xml.ctmpl deleted file mode 100644 index cfd8ddd719..0000000000 --- a/ansible/system_roles/clickhouse/files/administrativedomain.xml.ctmpl +++ /dev/null @@ -1,42 +0,0 @@ - - Generated by NOC, do not change manually - - administrativedomain - - 86400 - 604800 - - - - - - - http://{{ range $index, $element := service "datasource~_agent" }}{{ if eq $index 0 }}{{ .Address }}:{{ .Port }}{{ end }}{{ else }}127.0.0.1:65535{{ end }}/api/datasource/ch_administrativedomain.tsv - TabSeparated - - - - - bi_id - - - id - String - 0 - false - - - name - String - Unknown - false - - - parent - UInt64 - Unknown - true - - - - diff --git a/ansible/system_roles/clickhouse/files/alarmclass.xml.ctmpl b/ansible/system_roles/clickhouse/files/alarmclass.xml.ctmpl deleted file mode 100644 index 577b38a74c..0000000000 --- a/ansible/system_roles/clickhouse/files/alarmclass.xml.ctmpl +++ /dev/null @@ -1,36 +0,0 @@ - - Generated by NOC, do not change manually - - alarmclass - - 86400 - 604800 - - - - - - - http://{{ range $index, $element := service "datasource~_agent" }}{{ if eq $index 0 }}{{ .Address }}:{{ .Port }}{{ end }}{{ else }}127.0.0.1:65535{{ end }}/api/datasource/ch_alarmclass.tsv - TabSeparated - - - - - bi_id - - - id - String - 0 - false - - - name - String - Unknown - false - - - - diff --git a/ansible/system_roles/clickhouse/files/container.xml.ctmpl b/ansible/system_roles/clickhouse/files/container.xml.ctmpl deleted file mode 100644 index 432bce1eda..0000000000 --- a/ansible/system_roles/clickhouse/files/container.xml.ctmpl +++ /dev/null @@ -1,48 +0,0 @@ - - Generated by NOC, do not change manually - - container - - 86400 - 604800 - - - - - - - http://{{ range $index, $element := service "datasource~_agent" }}{{ if eq $index 0 }}{{ .Address }}:{{ .Port }}{{ end }}{{ else }}127.0.0.1:65535{{ end }}/api/datasource/ch_container.tsv - TabSeparated - - - - - bi_id - - - id - String - 0 - false - - - name - String - Unknown - false - - - parent - UInt64 - Unknown - true - - - address_text - String - Unknown - false - - - - diff --git a/ansible/system_roles/clickhouse/files/cpe.xml.ctmpl b/ansible/system_roles/clickhouse/files/cpe.xml.ctmpl deleted file mode 100644 index 270c54a678..0000000000 --- a/ansible/system_roles/clickhouse/files/cpe.xml.ctmpl +++ /dev/null @@ -1,115 +0,0 @@ - - Generated by NOC, do not change manually - - cpe - - 3600 - 3600 - - - - - - - http://{{ range $index, $element := service "datasource~_agent" }}{{ if eq $index 0 }}{{ .Address }}:{{ .Port }}{{ end }}{{ else }}127.0.0.1:65535{{ end }}/api/datasource/ch_cpe.tsv - TabSeparated - - - - - - bi_id - UInt64 - - - cpe_id - String - - - - interface_name - String - Unknown - false - - - local_id - String - Unknown - false - - - global_id - String - Unknown - false - - - name - String - Unknown - false - - - type - String - Unknown - false - - - vendor - String - Unknown - false - - - model - String - Unknown - false - - - version - String - Unknown - false - - - serial - String - Unknown - false - - - ip - String - Unknown - false - - - mac - String - Unknown - false - - - description - String - Unknown - false - - - location - String - Unknown - false - - - distance - String - Unknown - false - - - - \ No newline at end of file diff --git a/ansible/system_roles/clickhouse/files/interfaceattributes.xml.ctmpl b/ansible/system_roles/clickhouse/files/interfaceattributes.xml.ctmpl deleted file mode 100644 index 4f55b6e896..0000000000 --- a/ansible/system_roles/clickhouse/files/interfaceattributes.xml.ctmpl +++ /dev/null @@ -1,55 +0,0 @@ - - Generated by NOC, do not change manually - - interfaceattributes - - 3600 - 3600 - - - - - - - http://{{ range $index, $element := service "datasource~_agent" }}{{ if eq $index 0 }}{{ .Address }}:{{ .Port }}{{ end }}{{ else }}127.0.0.1:65535{{ end }}/api/datasource/ch_interfaceattributes.tsv - TabSeparated - - - - - - bi_id - UInt64 - - - name - String - - - - description - String - Unknown - false - - - profile - String - Unknown - false - - - in_speed - UInt64 - Unknown - false - - - is_uni - UInt8 - Unknown - false - - - - \ No newline at end of file diff --git a/ansible/system_roles/clickhouse/files/interfacedescription.xml.ctmpl b/ansible/system_roles/clickhouse/files/interfacedescription.xml.ctmpl deleted file mode 100644 index 5f1c1c07bb..0000000000 --- a/ansible/system_roles/clickhouse/files/interfacedescription.xml.ctmpl +++ /dev/null @@ -1,37 +0,0 @@ - - Generated by NOC, do not change manually - - interfacedescription - - 3600 - 3600 - - - - - - - http://{{ range $index, $element := service "datasource~_agent" }}{{ if eq $index 0 }}{{ .Address }}:{{ .Port }}{{ end }}{{ else }}127.0.0.1:65535{{ end }}/api/datasource/ch_interfacedescription.tsv - TabSeparated - - - - - - bi_id - UInt64 - - - name - String - - - - description - String - Unknown - false - - - - diff --git a/ansible/system_roles/clickhouse/files/interfaceprofile.xml.ctmpl b/ansible/system_roles/clickhouse/files/interfaceprofile.xml.ctmpl deleted file mode 100644 index 313091f972..0000000000 --- a/ansible/system_roles/clickhouse/files/interfaceprofile.xml.ctmpl +++ /dev/null @@ -1,42 +0,0 @@ - - Generated by NOC, do not change manually - - interfaceprofile - - 86400 - 604800 - - - - - - - http://{{ range $index, $element := service "datasource~_agent" }}{{ if eq $index 0 }}{{ .Address }}:{{ .Port }}{{ end }}{{ else }}127.0.0.1:65535{{ end }}/api/datasource/ch_interfaceprofile.tsv - TabSeparated - - - - - bi_id - - - id - String - 0 - false - - - name - String - Unknown - false - - - is_uni - UInt8 - Unknown - false - - - - diff --git a/ansible/system_roles/clickhouse/files/managedobject.xml.ctmpl b/ansible/system_roles/clickhouse/files/managedobject.xml.ctmpl deleted file mode 100644 index 5da793eb91..0000000000 --- a/ansible/system_roles/clickhouse/files/managedobject.xml.ctmpl +++ /dev/null @@ -1,90 +0,0 @@ - - Generated by NOC, do not change manually - - managedobject - - 86400 - 604800 - - - - - - - http://{{ range $index, $element := service "datasource~_agent" }}{{ if eq $index 0 }}{{ .Address }}:{{ .Port }}{{ end }}{{ else }}127.0.0.1:65535{{ end }}/api/datasource/ch_managedobject.tsv - TabSeparated - - - - - bi_id - - - id - String - 0 - false - - - name - String - Unknown - false - - - address - String - Unknown - false - - - profile - String - Unknown - false - - - platform - String - Unknown - false - - - version - String - Unknown - false - - - remote_id - String - Unknown - false - - - remote_system - String - Unknown - false - - - adm_domain_id - String - 0 - false - - - adm_domain_name - String - Unknown - false - - - location_address - String - Unknown - false - - - - diff --git a/ansible/system_roles/clickhouse/files/networksegment.xml.ctmpl b/ansible/system_roles/clickhouse/files/networksegment.xml.ctmpl deleted file mode 100644 index ed96574d90..0000000000 --- a/ansible/system_roles/clickhouse/files/networksegment.xml.ctmpl +++ /dev/null @@ -1,42 +0,0 @@ - - Generated by NOC, do not change manually - - networksegment - - 86400 - 604800 - - - - - - - http://{{ range $index, $element := service "datasource~_agent" }}{{ if eq $index 0 }}{{ .Address }}:{{ .Port }}{{ end }}{{ else }}127.0.0.1:65535{{ end }}/api/datasource/ch_networksegment.tsv - TabSeparated - - - - - bi_id - - - id - String - 0 - false - - - name - String - Unknown - false - - - parent - UInt64 - Unknown - true - - - - diff --git a/ansible/system_roles/clickhouse/files/objectprofile.xml.ctmpl b/ansible/system_roles/clickhouse/files/objectprofile.xml.ctmpl deleted file mode 100644 index 7d966132b6..0000000000 --- a/ansible/system_roles/clickhouse/files/objectprofile.xml.ctmpl +++ /dev/null @@ -1,60 +0,0 @@ - - Generated by NOC, do not change manually - - objectprofile - - 86400 - 604800 - - - - - - - http://{{ range $index, $element := service "datasource~_agent" }}{{ if eq $index 0 }}{{ .Address }}:{{ .Port }}{{ end }}{{ else }}127.0.0.1:65535{{ end }}/api/datasource/ch_objectprofile.tsv - TabSeparated - - - - - bi_id - - - id - String - 0 - false - - - name - String - Unknown - false - - - level - UInt16 - 0 - false - - - enable_ping - UInt8 - Unknown - false - - - enable_box_discovery - UInt8 - Unknown - false - - - enable_periodic_discovery - UInt8 - Unknown - false - - - - diff --git a/ansible/system_roles/clickhouse/files/platform.xml.ctmpl b/ansible/system_roles/clickhouse/files/platform.xml.ctmpl deleted file mode 100644 index 1b57922c75..0000000000 --- a/ansible/system_roles/clickhouse/files/platform.xml.ctmpl +++ /dev/null @@ -1,48 +0,0 @@ - - Generated by NOC, do not change manually - - platform - - 86400 - 604800 - - - - - - - http://{{ range $index, $element := service "datasource~_agent" }}{{ if eq $index 0 }}{{ .Address }}:{{ .Port }}{{ end }}{{ else }}127.0.0.1:65535{{ end }}/api/datasource/ch_platform.tsv - TabSeparated - - - - - bi_id - - - id - String - 0 - false - - - name - String - Unknown - false - - - vendor - String - Unknown - false - - - full_name - String - Unknown - false - - - - diff --git a/ansible/system_roles/clickhouse/files/pool.xml.ctmpl b/ansible/system_roles/clickhouse/files/pool.xml.ctmpl deleted file mode 100644 index 578128fec5..0000000000 --- a/ansible/system_roles/clickhouse/files/pool.xml.ctmpl +++ /dev/null @@ -1,36 +0,0 @@ - - Generated by NOC, do not change manually - - pool - - 86400 - 604800 - - - - - - - http://{{ range $index, $element := service "datasource~_agent" }}{{ if eq $index 0 }}{{ .Address }}:{{ .Port }}{{ end }}{{ else }}127.0.0.1:65535{{ end }}/api/datasource/ch_pool.tsv - TabSeparated - - - - - bi_id - - - id - String - 0 - false - - - name - String - Unknown - false - - - - diff --git a/ansible/system_roles/clickhouse/files/profile.xml.ctmpl b/ansible/system_roles/clickhouse/files/profile.xml.ctmpl deleted file mode 100644 index 929ef94a4a..0000000000 --- a/ansible/system_roles/clickhouse/files/profile.xml.ctmpl +++ /dev/null @@ -1,36 +0,0 @@ - - Generated by NOC, do not change manually - - profile - - 86400 - 604800 - - - - - - - http://{{ range $index, $element := service "datasource~_agent" }}{{ if eq $index 0 }}{{ .Address }}:{{ .Port }}{{ end }}{{ else }}127.0.0.1:65535{{ end }}/api/datasource/ch_profile.tsv - TabSeparated - - - - - bi_id - - - id - String - 0 - false - - - name - String - Unknown - false - - - - diff --git a/ansible/system_roles/clickhouse/files/serviceprofile.xml.ctmpl b/ansible/system_roles/clickhouse/files/serviceprofile.xml.ctmpl deleted file mode 100644 index 31440f853f..0000000000 --- a/ansible/system_roles/clickhouse/files/serviceprofile.xml.ctmpl +++ /dev/null @@ -1,48 +0,0 @@ - - Generated by NOC, do not change manually - - serviceprofile - - 86400 - 604800 - - - - - - - http://{{ range $index, $element := service "datasource~_agent" }}{{ if eq $index 0 }}{{ .Address }}:{{ .Port }}{{ end }}{{ else }}127.0.0.1:65535{{ end }}/api/datasource/ch_serviceprofile.tsv - TabSeparated - - - - - bi_id - - - id - String - 0 - false - - - name - String - Unknown - false - - - description - String - Unknown - false - - - glyph - String - Unknown - false - - - - diff --git a/ansible/system_roles/clickhouse/files/state.xml.ctmpl b/ansible/system_roles/clickhouse/files/state.xml.ctmpl deleted file mode 100644 index 67d3740242..0000000000 --- a/ansible/system_roles/clickhouse/files/state.xml.ctmpl +++ /dev/null @@ -1,54 +0,0 @@ - - Generated by NOC, do not change manually - - state - - 3600 - 3600 - - - - - - - http://{{ range $index, $element := service "datasource~_agent" }}{{ if eq $index 0 }}{{ .Address }}:{{ .Port }}{{ end }}{{ else }}127.0.0.1:65535{{ end }}/api/datasource/ch_state.tsv - TabSeparated - - - - - bi_id - - - id - String - 0 - false - - - name - String - Unknown - false - - - workflow_name - String - Unknown - false - - - is_default - UInt8 - Unknown - false - - - is_productive - UInt8 - Unknown - false - - - - diff --git a/ansible/system_roles/clickhouse/files/subscriberprofile.xml.ctmpl b/ansible/system_roles/clickhouse/files/subscriberprofile.xml.ctmpl deleted file mode 100644 index 11416eaf69..0000000000 --- a/ansible/system_roles/clickhouse/files/subscriberprofile.xml.ctmpl +++ /dev/null @@ -1,48 +0,0 @@ - - Generated by NOC, do not change manually - - subscriberprofile - - 86400 - 604800 - - - - - - - http://{{ range $index, $element := service "datasource~_agent" }}{{ if eq $index 0 }}{{ .Address }}:{{ .Port }}{{ end }}{{ else }}127.0.0.1:65535{{ end }}/api/datasource/ch_subscriberprofile.tsv - TabSeparated - - - - - bi_id - - - id - String - 0 - false - - - name - String - Unknown - false - - - description - String - Unknown - false - - - glyph - String - Unknown - false - - - - diff --git a/ansible/system_roles/clickhouse/files/vendor.xml.ctmpl b/ansible/system_roles/clickhouse/files/vendor.xml.ctmpl deleted file mode 100644 index 4229760143..0000000000 --- a/ansible/system_roles/clickhouse/files/vendor.xml.ctmpl +++ /dev/null @@ -1,36 +0,0 @@ - - Generated by NOC, do not change manually - - vendor - - 86400 - 604800 - - - - - - - http://{{ range $index, $element := service "datasource~_agent" }}{{ if eq $index 0 }}{{ .Address }}:{{ .Port }}{{ end }}{{ else }}127.0.0.1:65535{{ end }}/api/datasource/ch_vendor.tsv - TabSeparated - - - - - bi_id - - - id - String - 0 - false - - - name - String - Unknown - false - - - - diff --git a/ansible/system_roles/clickhouse/files/version.xml.ctmpl b/ansible/system_roles/clickhouse/files/version.xml.ctmpl deleted file mode 100644 index afc7b09cb6..0000000000 --- a/ansible/system_roles/clickhouse/files/version.xml.ctmpl +++ /dev/null @@ -1,48 +0,0 @@ - - Generated by NOC, do not change manually - - version - - 86400 - 604800 - - - - - - - http://{{ range $index, $element := service "datasource~_agent" }}{{ if eq $index 0 }}{{ .Address }}:{{ .Port }}{{ end }}{{ else }}127.0.0.1:65535{{ end }}/api/datasource/ch_version.tsv - TabSeparated - - - - - bi_id - - - id - String - 0 - false - - - name - String - Unknown - false - - - profile - String - Unknown - false - - - vendor - String - Unknown - false - - - - diff --git a/ansible/system_roles/clickhouse/files/workflow.xml.ctmpl b/ansible/system_roles/clickhouse/files/workflow.xml.ctmpl deleted file mode 100644 index 82ec2e86a7..0000000000 --- a/ansible/system_roles/clickhouse/files/workflow.xml.ctmpl +++ /dev/null @@ -1,42 +0,0 @@ - - Generated by NOC, do not change manually - - workflow - - 3600 - 3600 - - - - - - - http://{{ range $index, $element := service "datasource~_agent" }}{{ if eq $index 0 }}{{ .Address }}:{{ .Port }}{{ end }}{{ else }}127.0.0.1:65535{{ end }}/api/datasource/ch_workflow.tsv - TabSeparated - - - - - bi_id - - - id - String - 0 - false - - - name - String - Unknown - false - - - is_active - UInt8 - Unknown - false - - - - \ No newline at end of file diff --git a/ansible/system_roles/clickhouse/tasks/main.yml b/ansible/system_roles/clickhouse/tasks/main.yml index e1eb711234..681cbc61c0 100644 --- a/ansible/system_roles/clickhouse/tasks/main.yml +++ b/ansible/system_roles/clickhouse/tasks/main.yml @@ -48,20 +48,6 @@ tags: - config -- name: place clickhouse ct template - include_role: - name: consul-template - tasks_from: service - vars: - ct_service_name: "{{ item[:-10]| basename }}" - ct_service_source: "{{ item | basename }}" - ct_service_dest: "{{ ch_dictionaries_path }}/{{ item[:-6] |basename }}" - ct_service_source_template: "False" - with_fileglob: - - "*.ctmpl" - tags: - - config - - name: install config overrides template: src: "noc.xml" diff --git a/ansible/system_roles/clickhouse/templates/config.xml b/ansible/system_roles/clickhouse/templates/config.xml index 7bcda44d3a..9f398bb51d 100644 --- a/ansible/system_roles/clickhouse/templates/config.xml +++ b/ansible/system_roles/clickhouse/templates/config.xml @@ -118,7 +118,6 @@ - {{ ch_dictionaries_path }}/*.xml - {{ ch_dictionaries_path }}/*.xml