Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[dev.icinga.com #8211] icinga2 node update should not write config for blacklisted zones/host #2513

Closed
icinga-migration opened this issue Jan 14, 2015 · 7 comments
Labels
area/cli Command line helpers bug Something isn't working
Milestone

Comments

@icinga-migration
Copy link

This issue has been migrated from Redmine: https://dev.icinga.com/issues/8211

Created by aledermueller on 2015-01-14 12:01:14 +00:00

Assignee: mfriedrich
Status: Resolved (closed on 2015-02-09 18:00:02 +00:00)
Target Version: 2.3.0
Last Update: 2016-09-13 10:52:57 +00:00 (in Redmine)

Icinga Version: 2.2.3

**Hi,

my blacklist on the "master" endpoint in the "master" zone is zone=* host=* but doing a `icinga2 node update-config` writes the zone, endpoint and host config for every icinga agent which is using "master" as the parent zone.

Regards, Achim

Changesets

2015-02-09 17:56:17 +00:00 by (unknown) cdfd4d6

node update-config: Check node name against blacklist too

fixes #8211
@icinga-migration
Copy link
Author

Updated by gbeutner on 2015-01-14 12:17:25 +00:00

  • Subject changed from icinga2 node update should write config for blacklisted zones/host to icinga2 node update should not write config for blacklisted zones/host
  • Description updated

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2015-02-09 16:15:47 +00:00

I can reproduce the issue.

# icinga2 node blacklist add --zone icinga2-node2.localdomain --host '*'

# icinga2 node update-config
information/cli: Updating node configuration for 
Node 'icinga2-node2.localdomain' (last seen: Mon Feb  9 17:13:21 2015)
    * Host 'icinga2-node2.localdomain'
        * Service 'ping4'
        * Service 'ping6'
        * Service 'ssh'
        * Service 'http'
        * Service 'disk'
        * Service 'disk /'
        * Service 'icinga'
        * Service 'load'
        * Service 'procs'
        * Service 'swap'
        * Service 'users'
information/Utility: Loading library 'libicinga.so'
information/cli: Adding host 'icinga2-node2.localdomain' to the repository.
information/cli: Dumping changelog items to file '/var/lib/icinga2/repository/changes/1423498412.733479-Host-5ebb306cab87e444be828d72343f67cbf2b9640cbbe8328173a0f1030d700857.change'
information/cli: Checking object against blacklist.
information/cli: Checking object against whitelist.
warning/cli: Host 'icinga2-node2.localdomain' on node 'icinga2-node2.localdomain' is blacklisted, but not whitelisted. Skipping.
information/cli: Adding endpoint 'icinga2-node2.localdomain' to the repository.
information/cli: Dumping changelog items to file '/var/lib/icinga2/repository/changes/1423498412.736294-Endpoint-5ebb306cab87e444be828d72343f67cbf2b9640cbbe8328173a0f1030d700857.change'
information/cli: Adding zone 'icinga2-node2.localdomain' to the repository.
information/cli: Dumping changelog items to file '/var/lib/icinga2/repository/changes/1423498412.7374201-Zone-5ebb306cab87e444be828d72343f67cbf2b9640cbbe8328173a0f1030d700857.change'
information/cli: Committing node configuration.
Changes to be committed:

Adding host 'icinga2-node2.localdomain'
    check_command = "cluster-zone"
    import = [ "satellite-host" ]
Adding endpoint 'icinga2-node2.localdomain'
Adding zone 'icinga2-node2.localdomain'
    endpoints = [ "icinga2-node2.localdomain" ]
    parent = "master"

information/cli: Writing config object 'icinga2-node2.localdomain' to file '/etc/icinga2/repository.d/hosts/icinga2-node2.localdomain.conf'
information/cli: Writing config object 'icinga2-node2.localdomain' to file '/etc/icinga2/repository.d/endpoints/icinga2-node2.localdomain.conf'
information/cli: Writing config object 'icinga2-node2.localdomain' to file '/etc/icinga2/repository.d/zones/icinga2-node2.localdomain.conf'
Make sure to reload Icinga 2 for these changes to take effect.

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2015-02-09 17:56:04 +00:00

  • Category set to CLI
  • Status changed from New to Assigned
  • Assigned to set to mfriedrich
  • Target Version set to 2.3.0

@icinga-migration
Copy link
Author

Updated by Anonymous on 2015-02-09 18:00:02 +00:00

  • Status changed from Assigned to Resolved
  • Done % changed from 0 to 100

Applied in changeset cdfd4d6.

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2015-02-13 16:25:53 +00:00

  • Estimated Hours set to 2

@icinga-migration
Copy link
Author

Updated by ajoaugustine on 2015-10-15 05:19:50 +00:00

I still see the issue in version: r2.3.10-1

I blacklisted a node sci-git-01
icinga2 node blacklist add --zone "sci-git-01" --host "sci-git-01"

Verified its listed in the black list:
icinga2 node blacklist list Listing all blacklist entries: blacklist filter for Node: 'sci-git-01' Host: 'sci-git-01' Service: ''.

updated the config with:
rootscx-mon-01:/etc/icinga2/repository.d# icinga2 node update-config|grep sci-git-01
Node 'sci-git-01' (last seen: Wed Oct 14 22:13:32 2015)

  • Host 'sci-git-01'
    warning/cli: Host 'sci-git-01' on node 'sci-git-01' is blacklisted, but not whitelisted. Skipping.
    information/cli: Adding host 'sci-git-01' to the repository.
    warning/cli: Host 'sci-git-01' on node 'sci-git-01' is blacklisted, but not whitelisted. Skipping.
    information/cli: Adding endpoint 'sci-git-01' to the repository.
    information/cli: Adding zone 'sci-git-01' to the repository.
    Adding host 'sci-git-01'
    Adding endpoint 'sci-git-01'
    Adding zone 'sci-git-01'
    endpoints = [ "sci-git-01" ]
    information/cli: Writing config object 'sci-git-01' to file '/etc/icinga2/repository.d/hosts/sci-git-01.conf'
    information/cli: Writing config object 'sci-git-01' to file '/etc/icinga2/repository.d/endpoints/sci-git-01.conf'
    information/cli: Writing config object 'sci-git-01' to file '/etc/icinga2/repository.d/zones/sci-git-01.conf'@

@icinga-migration
Copy link
Author

Updated by schaefus on 2016-09-13 10:52:57 +00:00

still see it in r2.5.3-1, but not for all hosts, any idea?

icinga2 node blacklist add --zone "domain.​de" --host "*"

icinga2 node blacklist list
"blacklist filter for Node: 'domain.​de' Host: '*' Service: ''."

icinga2 node update-config | grep sa-cron
"Node 'domain.de' (last seen: Tue Sep 13 12:50:57 2016)
information/cli: Adding host 'domain.de' to the repository.
information/cli: Adding endpoint 'domain.de' to the repository.
information/cli: Adding zone 'domain.de' to the repository.
Adding host 'domain.de'
Adding endpoint 'domain.de'
Adding zone 'domain.de'
endpoints = [ "domain.de" ]
information/cli: Writing config object 'domain.de' to file '/etc/icinga2/repository.d/hosts/domain.de.conf'
information/cli: Writing config object 'domain.de' to file '/etc/icinga2/repository.d/endpoints/domain.de.conf'
information/cli: Writing config object 'domain.de' to file '/etc/icinga2/repository.d/zones/domain.de.conf'"

@icinga-migration icinga-migration added bug Something isn't working area/cli Command line helpers labels Jan 17, 2017
@icinga-migration icinga-migration added this to the 2.3.0 milestone Jan 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/cli Command line helpers bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant