Actions
Bug #16532
opencentreon-plugin not apply technics
Pull Request:
Severity:
Major - prevents use of part of Rudder | no simple workaround
UX impact:
User visibility:
Operational - other Techniques | Rudder settings | Plugins
Effort required:
Priority:
0
Name check:
To do
Fix check:
To do
Regression:
Description
In rudder in compliance report :
TH_OS-SYS-Linux-Centos-7
Host follows TH_OS-SYS-Linux-Centos-7 monitoring template was correct
in centreon :
centreon-central.communaute-omr.fr --> Rudder agent node 083cdeb9-b984-49ad-9cd5-de27afa39adf --> 192.168.122.110 --> Central --> generic-active-host-custom
TH_OS-SYS-Linux-Centos-7 not present in template of server
in command line all is good :
/opt/rudder/bin/centreon-plugin synchronize-hosts
[ ] Pulling data from Rudder server API...
[+] Done
[ ] Checking if Centreon is up-to-date...
[+] Done
[root@rudder-omr rudder]# /opt/rudder/bin/centreon-plugin apply-configuration
[+] Done
Updated by pascal legrand almost 5 years ago
[root@centreon-central tmp]# rudder agent run -i Rudder agent 6.0.2.release Node uuid: 083cdeb9-b984-49ad-9cd5-de27afa39adf Start execution with config [20200114-104933-de8dd16e] 2020-01-14T09:58:16+00:00 rudder info: Automatically promoting context scope for 'heartbeat_sent' to namespace visibility, due to persistence 2020-01-14T09:58:16+00:00 R: [INFO] Starting CFEngine 3.12.3 on host centreon-central.communaute-omr.fr (centos_7 x86_64) M| State Technique Component Key Message E| compliant Common ncf Initialization Configuration library initialization was correct E| compliant Common Security parameters The internal environment security is acceptable 2020-01-14T09:58:16+00:00 rudder info: Deleted file '/var/rudder/cfengine-community/outputs/cf_centreon_central_communaute_omr_fr__1578390864_Tue_Jan__7_10_54_24_2020_0x7f9baff9b700' 2020-01-14T09:58:16+00:00 rudder info: Deleted file '/var/rudder/modified-files/_var_rudder_tmp_rudder_monitoring_csv_1576403673_Sun_Dec_15_10_54_34_2019_cf_before_edit' E| compliant Common CRON Daemon Cron daemon status was correct E| compliant Common Log system for reports Reports forwarding to policy server was correct 2020-01-14T09:58:16+00:00 rudder info: Deleted file '/var/rudder/tmp/rudder_monitoring.csv' info Common None /var/rudder/tmp/r| Remove file /var/rudder/tmp/rudder_monitoring.csv was repaired info Inventory inventory An inventory was already sent less than 8 hours ago E| compliant Inventory inventory Next inventory scheduled between 00:00 and 06:00 E| compliant Centreon_plugins File check exists /etc/yum.repos.d/| Check if /etc/yum.repos.d/centreon-plugin-packs.repo exists was correct E| n/a Centreon_plugins File content /etc/yum.repos.d/| Skipping method 'File content' with key parameter '/etc/yum.repos.d/centreon-plugin-packs.repo' since condition 'any.(file_check_exists__etc_yum_repos_d_centreon_plugin_packs_repo_error)' is not reached was not applicable 2020-01-14T09:58:16+00:00 rudder info: Created file '/var/rudder/tmp/rudder_monitoring.csv', mode 0600 2020-01-14T09:58:16+00:00 rudder info: Moved '/var/rudder/tmp/rudder_monitoring.csv_1578995895_Tue_Jan_14_10_58_16_2020.cf-before-edit' to repository location '/var/rudder/modified-files/_var_rudder_tmp_rudder_monitoring_csv_1578995895_Tue_Jan_14_10_58_16_2020_cf_before_edit' 2020-01-14T09:58:16+00:00 rudder info: Edit file '/var/rudder/tmp/rudder_monitoring.csv' info Centreon_Template_Centos7 Monitoring template /var/rudder/tmp/r| Insert content into /var/rudder/tmp/rudder_monitoring.csv was repaired info Centreon_Template_Centos7 Monitoring template /var/rudder/tmp/r| Insert content into /var/rudder/tmp/rudder_monitoring.csv was repaired info Centreon_Template_Centos7 Monitoring template /var/rudder/tmp/r| Append content if needed into /var/rudder/tmp/rudder_monitoring.csv was repaired E| compliant Centreon_Template_Centos7 Monitoring template TH_OS-SYS-Linux-C| Host follows TH_OS-SYS-Linux-Centos-7 monitoring template was correct E| error Centreon_Template_Centos7 Sharedfile to node centreon-template File /var/rudder/shared-files/ does not exist could not be repaired 2020-01-14T09:58:16+00:00 rudder info: Executing 'no timeout' ... '/opt/rudder/bin/rudder-sign /var/rudder/shared-files/ 1.1' 2020-01-14T09:58:16+00:00 error: Finished command related to promiser '/opt/rudder/bin/rudder-sign' -- an error occurred, returned 2 2020-01-14T09:58:16+00:00 notice: Q: "...udder-sign /var": ERROR: Cannot sign: The file /var/rudder/shared-files/ doesn't exist 2020-01-14T09:58:16+00:00 rudder info: Last 1 quoted lines were generated by promiser '/opt/rudder/bin/rudder-sign /var/rudder/shared-files/ 1.1' 2020-01-14T09:58:16+00:00 rudder info: Completed execution of '/opt/rudder/bin/rudder-sign /var/rudder/shared-files/ 1.1' 2020-01-14T09:58:16+00:00 error: Method 'sharedfile_to_node' failed in some repairs 2020-01-14T09:58:16+00:00 error: Method 'Centreon_Template_Centos7' failed in some repairs 2020-01-14T09:58:16+00:00 error: Method 'run_98694c0b_722f_4b7f_8051_5395fbb764da' failed in some repairs 2020-01-14T09:58:16+00:00 R: [INFO] Executing is-active on snmpd using the systemctl method E| compliant SNMP_Configuration Service check running snmpd Check if the service snmpd is started was correct info SNMP_Configuration Package check installed net-snmp Verify that package net-snmp is installed was correct E| compliant SNMP_Configuration Package check installed net-snmp Check that package net-snmp is installed was correct info SNMP_Configuration Package check installed net-snmp-utils Verify that package net-snmp-utils is installed was correct E| compliant SNMP_Configuration Package check installed net-snmp-utils Check that package net-snmp-utils is installed was correct E| compliant SNMP_Configuration File content /etc/snmp/snmpd.c| Insert content into /etc/snmp/snmpd.conf was correct E| n/a SNMP_Configuration Package absent net-snmp Skipping method 'Package absent' with key parameter 'net-snmp' since condition 'any.(service_check_running_snmpd_error)' is not reached was not applicable E| n/a SNMP_Configuration Package absent net-snmp-utils Skipping method 'Package absent' with key parameter 'net-snmp-utils' since condition 'any.(service_check_running_snmpd_error)' is not reached was not applicable E| n/a SNMP_Configuration Command execution yum install -y ne| Skipping method 'Command execution' with key parameter 'yum install -y net-snmp' since condition 'centos.(package_check_installed_net_snmp_error)' is not reached was not applicable E| n/a SNMP_Configuration Command execution yum install -y ne| Skipping method 'Command execution' with key parameter 'yum install -y net-snmp-utils' since condition 'centos.(package_check_installed_net_snmp_utils_error)' is not reached was not applicable 2020-01-14T09:58:17+00:00 rudder info: Executing 'no timeout' ... '/opt/rudder/bin/rudder-sign /var/rudder/tmp/rudder_monitoring.csv 1.1' 2020-01-14T09:58:17+00:00 rudder info: Completed execution of '/opt/rudder/bin/rudder-sign /var/rudder/tmp/rudder_monitoring.csv 1.1' 2020-01-14T09:58:17+00:00 rudder info: Executing 'no timeout' ... 'code=`/opt/rudder/bin/curl https://192.168.122.230/rudder/relay-api/shared-files/root/083cdeb9-b984-49ad-9cd5-de27afa39adf/rudder_monitoring.csv?hash=0632e0d641781bcde8fb824c96f906bad3bccbc55b0a7e88c4883cb95836f63106bab38d64e28aef2d890076f4ec8a7a347e712c6814f38d59213e7312d1d770 --insecure --tlsv1 --location --head --output /dev/null --silent --fail --write-out %{http_code}` || if [ $code -eq 404 ]; then exit 22; elif [ $code -eq 200 ]; then exit 0; else exit 254; fi' 2020-01-14T09:58:17+00:00 rudder info: Command related to promiser 'code=`/opt/rudder/bin/curl https://192.168.122.230/rudder/relay-api/shared-files/root/083cdeb9-b984-49ad-9cd5-de27afa39adf/rudder_monitoring.csv?hash=0632e0d641781bcde8fb824c96f906bad3bccbc55b0a7e88c4883cb95836f63106bab38d64e28aef2d890076f4ec8a7a347e712c6814f38d59213e7312d1d770 --insecure --tlsv1 --location --head --output /dev/null --silent --fail --write-out %{http_code}` || if [ $code -eq 404 ]; then exit 22; elif [ $code -eq 200 ]; then exit 0; else exit 254; fi' returned code defined as promise repaired 22 2020-01-14T09:58:17+00:00 rudder info: Completed execution of 'code=`/opt/rudder/bin/curl https://192.168.122.230/rudder/relay-api/shared-files/root/083cdeb9-b984-49ad-9cd5-de27afa39adf/rudder_monitoring.csv?hash=0632e0d641781bcde8fb824c96f906bad3bccbc55b0a7e88c4883cb95836f63106bab38d64e28aef2d890076f4ec8a7a347e712c6814f38d59213e7312d1d770 --insecure --tlsv1 --location --head --output /dev/null --silent --fail --write-out %{http_code}` || if [ $code -eq 404 ]; then exit 22; elif [ $code -eq 200 ]; then exit 0; else exit 254; fi' 2020-01-14T09:58:17+00:00 rudder info: Executing 'no timeout' ... 'echo | cat /var/rudder/tmp/rudder_monitoring.csv.sign - /var/rudder/tmp/rudder_monitoring.csv | /opt/rudder/bin/curl https://192.168.122.230/rudder/relay-api/shared-files/root/083cdeb9-b984-49ad-9cd5-de27afa39adf/rudder_monitoring.csv?ttl=1d --insecure --tlsv1 --location --request PUT --output /dev/null --silent --fail --header 'Content-Type: application/octet-stream' --data-binary @-' 2020-01-14T09:58:17+00:00 error: Command related to promiser 'echo | cat /var/rudder/tmp/rudder_monitoring.csv.sign - /var/rudder/tmp/rudder_monitoring.csv | /opt/rudder/bin/curl' returned code defined as promise failed 22 2020-01-14T09:58:17+00:00 rudder info: Completed execution of 'echo | cat /var/rudder/tmp/rudder_monitoring.csv.sign - /var/rudder/tmp/rudder_monitoring.csv | /opt/rudder/bin/curl https://192.168.122.230/rudder/relay-api/shared-files/root/083cdeb9-b984-49ad-9cd5-de27afa39adf/rudder_monitoring.csv?ttl=1d --insecure --tlsv1 --location --request PUT --output /dev/null --silent --fail --header 'Content-Type: application/octet-stream' --data-binary @-' 2020-01-14T09:58:17+00:00 R: @@@@log_repaired@@@@Monitoring@@rudder_monitoring.csv@@2020-01-14 09 the name rudder_monitoring.csv for 1d was repaired 2020-01-14T09:58:17+00:00 error: Method 'sharedfile_to_node' failed in some repairs E| repaired Common Monitoring Share Rud 2020-01-14T09:58:17+00:00 error: Method 'monitoring_hook_post' failed in some repairs warning 1 reports were not parsable. ## Summary ##################################################################### 18 components verified in 8 directives => 18 components in Enforce mode -> 11 compliant -> 1 repaired -> 5 not-applicable -> 1 error Execution time: 2.02s ################################################################################ [root@centreon-central tmp]# ls -l /var/rudder/tmp/rudder_monitoring.csv -rw------- 1 root root 34 Jan 14 10:58 /var/rudder/tmp/rudder_monitoring.csv [root@centreon-central tmp]# cat /var/rudder/tmp/rudder_monitoring.csv.sign header=rudder-signature-v1 algorithm=sha512 digest=59199ef5ebb2c587329ae60aef7d8a034e3c3b1005bdd0313017326880f39b254291f4e982a6f84e2e83efab8e 6699e0320086206715116fab4cc298031cf76f51a571ed9dbb5771d62dcd84b8b72fdab190b4251ed892fa772504dbe60 87e64f64abba0b5f752cc1052d55bd19bea819e3f1df08bb0e2e14fc5c1c5ebe7cb3528f3c7140e00391dec6d7f8d3afb 1e54cb85f61f91a89c04c24805f8d93e3a302fd01a39378cc339d7f4993a8c558f48c87b01aa03ccd2ac6734ec1d2e2f8 b569ad40b5e09d794ce368bb0bcadfde9aafe383e068ca4b1fb643fbefe16e7ac08109bcd9def2e15bed5565df3e0a4c8 hash_value=0632e0d641781bcde8fb824c96f906bad3bccbc55b0a7e88c4883cb95836f63106bab38d64e28aef2d8900 short_pubkey=MIICCgKCAgEA6MsN6K7zfg8n0ZlPQrT+Grq1RXAdMigmEFb3W31UOkE15ImpbxMPYvgyTKVduJ4i/jwkYc7Q L1bVed7oK5t+TBhm5pkRJYVFFPt8buvjxirvDYresOK2DPYulLiHqyLLckNDMEErPVHTOqjR3XknOu1mvluyskDjyqw1N0atS RbC/elhgqMYqdLREeKcWgJHVnhdlDqTt+DVQpTJ37+/E3vBrlUJw4ZyJl6BIE7CD4fUO7GUpSqH5uDjPXvvZgaqJPNlRXPl0J rEWf/7VW511QQeHkEHf7WCWu8PB6Rwv1cWoTiS7kc+yxd45a/tLaqx5+aCh2t9FlUYokSI5t9HkCAwEAAQ== hostname=centreon-central.communaute-omr.fr keydate=2019-10-31 11:56:49.487703795 +0100 keyid=8E6DF479 [root@centreon-central tmp]# /opt/rudder/bin/curl https://192.168.122.230/rudder/relay-api/shared c55b0a7e88c4883cb95836f63106bab38d64e28aef2d890076f4ec8a7a347e712c6814f38d59213e7312d1d770 --inse curl: option --write-out: requires parameter curl: try 'curl --help' or 'curl --manual' for more information
test du curl :
[root@centreon-central tmp]# /opt/rudder/bin/curl https://192.168.122.230/rudder/relay-api/shared c55b0a7e88c4883cb95836f63106bab38d64e28aef2d890076f4ec8a7a347e712c6814f38d59213e7312d1d770 --inse HTTP/1.1 404 Not Found Date: Tue, 14 Jan 2020 10:07:09 GMT Server: Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips mod_wsgi/3.4 Python/2.7.5 content-type: text/plain; charset=utf-8 X-Chrome-Exponential-Throttling: disable X-UA-Compatible: IE=Edge
Updated by Vincent MEMBRÉ almost 5 years ago
- Project changed from Rudder to Centreon
- Category deleted (
Web - Compliance & node report) - Target version changed from 6.0.3 to 6.0-1.3
Updated by Vincent MEMBRÉ over 4 years ago
- Target version changed from 6.0-1.3 to 6.0-1.4
Updated by François ARMAND over 4 years ago
- User visibility set to Operational - other Techniques | Rudder settings | Plugins
- Priority changed from 0 to 48
Updated by Vincent MEMBRÉ over 1 year ago
- Target version changed from 6.0-1.4 to 7.2
- Priority changed from 48 to 0
Updated by Alexis Mousset about 1 year ago
- Target version changed from 7.2 to 7.3
Actions