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 cfd8ddd719995b69d567ee2a207af7a49b3924ec..0000000000000000000000000000000000000000 --- 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 577b38a74cec7e240c631215802e57662634a7d4..0000000000000000000000000000000000000000 --- 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 432bce1eda541be8259002cb7d1584d2a5009e79..0000000000000000000000000000000000000000 --- 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 270c54a678d5d758b202758a24d1a576a11ae32e..0000000000000000000000000000000000000000 --- 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 4f55b6e896666626249d1cb72b69fb26cf484639..0000000000000000000000000000000000000000 --- 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 5f1c1c07bbeaf4938d338a313127c83b6012762c..0000000000000000000000000000000000000000 --- 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 313091f972a53186c384eb8fd493145133062f13..0000000000000000000000000000000000000000 --- 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 5da793eb919f56b7a9c1f55897aa309da5c363d3..0000000000000000000000000000000000000000 --- 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 ed96574d908efc56e216e27b34e6dc3d32b1942d..0000000000000000000000000000000000000000 --- 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 7d966132b6f270962ba58007b35246b6340f1416..0000000000000000000000000000000000000000 --- 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 1b57922c751a26452a17c2aa79269233c651d7fa..0000000000000000000000000000000000000000 --- 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 578128fec5af6dc2b609e2c5c5ea3c410c640610..0000000000000000000000000000000000000000 --- 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 929ef94a4a3f728dbc105d127e17a134ca1fac36..0000000000000000000000000000000000000000 --- 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 31440f853f6552e77a68534fefe50c6cd439eef9..0000000000000000000000000000000000000000 --- 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 67d37402427341f8fb37f67de246a4edbe9cc630..0000000000000000000000000000000000000000 --- 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 11416eaf69ccd9e1223fcc035fe8ca17c59e72f6..0000000000000000000000000000000000000000 --- 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 4229760143e2d567db7d0f6172f8d220e0d63c50..0000000000000000000000000000000000000000 --- 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 afc7b09cb64c8101a8739e6661857a6a8a50025e..0000000000000000000000000000000000000000 --- 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 82ec2e86a7ff5b5e18d6baff09b6f7931587e7ee..0000000000000000000000000000000000000000 --- 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 e1eb711234fcebf22de6ed5a595c88aa0e83a0ae..681cbc61c0ba6015b3a89957b5980d806ec346e5 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/clickhouse.goss.yml.j2 b/ansible/system_roles/clickhouse/templates/clickhouse.goss.yml.j2 index 5dfdc1d32f1362c4e59d3bd19fce5dac23e3bd8a..22d3d2f6a9d17c731d1b5810339b0f8e39c8da37 100644 --- a/ansible/system_roles/clickhouse/templates/clickhouse.goss.yml.j2 +++ b/ansible/system_roles/clickhouse/templates/clickhouse.goss.yml.j2 @@ -20,132 +20,6 @@ file: group: clickhouse filetype: file contains: [] - {{ ch_dictionaries_path }}/administrativedomain.xml: - exists: true - mode: "0644" - owner: root - group: root - filetype: file - contains: ['!/127.0.0.1:65535/'] - {{ ch_dictionaries_path }}/alarmclass.xml: - exists: true - mode: "0644" - owner: root - group: root - filetype: file - contains: ['!/127.0.0.1:65535/'] - {{ ch_dictionaries_path }}/cpe.xml: - exists: true - mode: "0644" - owner: root - group: root - filetype: file - contains: ['!/127.0.0.1:65535/'] - {{ ch_dictionaries_path }}/container.xml: - exists: true - mode: "0644" - owner: root - group: root - filetype: file - contains: ['!/127.0.0.1:65535/'] - {{ ch_dictionaries_path }}/interfaceattributes.xml: - exists: true - mode: "0644" - owner: root - group: root - filetype: file - contains: ['!/127.0.0.1:65535/'] - {{ ch_dictionaries_path }}/interfacedescription.xml: - exists: true - mode: "0644" - owner: root - group: root - filetype: file - contains: ['!/127.0.0.1:65535/'] - {{ ch_dictionaries_path }}/interfaceprofile.xml: - exists: true - mode: "0644" - owner: root - group: root - filetype: file - contains: ['!/127.0.0.1:65535/'] - {{ ch_dictionaries_path }}/managedobject.xml: - exists: true - mode: "0644" - owner: root - group: root - filetype: file - contains: ['!/127.0.0.1:65535/'] - {{ ch_dictionaries_path }}/networksegment.xml: - exists: true - mode: "0644" - owner: root - group: root - filetype: file - contains: ['!/127.0.0.1:65535/'] - {{ ch_dictionaries_path }}/platform.xml: - exists: true - mode: "0644" - owner: root - group: root - filetype: file - contains: ['!/127.0.0.1:65535/'] - {{ ch_dictionaries_path }}/pool.xml: - exists: true - mode: "0644" - owner: root - group: root - filetype: file - contains: ['!/127.0.0.1:65535/'] - {{ ch_dictionaries_path }}/profile.xml: - exists: true - mode: "0644" - owner: root - group: root - filetype: file - contains: ['!/127.0.0.1:65535/'] - {{ ch_dictionaries_path }}/state.xml: - exists: true - mode: "0644" - owner: root - group: root - filetype: file - contains: ['!/127.0.0.1:65535/'] - {{ ch_dictionaries_path }}/vendor.xml: - exists: true - mode: "0644" - owner: root - group: root - filetype: file - contains: ['!/127.0.0.1:65535/'] - {{ ch_dictionaries_path }}/version.xml: - exists: true - mode: "0644" - owner: root - group: root - filetype: file - contains: ['!/127.0.0.1:65535/'] - {{ ch_dictionaries_path }}/subscriberprofile.xml: - exists: true - mode: "0644" - owner: root - group: root - filetype: file - contains: ['!/127.0.0.1:65535/'] - {{ ch_dictionaries_path }}/serviceprofile.xml: - exists: true - mode: "0644" - owner: root - group: root - filetype: file - contains: ['!/127.0.0.1:65535/'] - {{ ch_dictionaries_path }}/workflow.xml: - exists: true - mode: "0644" - owner: root - group: root - filetype: file - contains: ['!/127.0.0.1:65535/'] {{ ch_data_dir }}: exists: true mode: "0700" diff --git a/ansible/system_roles/clickhouse/templates/config.xml b/ansible/system_roles/clickhouse/templates/config.xml index 7bcda44d3aa1028838f22f79df0174a040308185..9f398bb51d774741fd3ad9b7e16052718ddcad87 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