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

Check defined on server (subscription check) results in changes on every run #265

Closed
jaxxstorm opened this issue Oct 29, 2014 · 5 comments
Closed

Comments

@jaxxstorm
Copy link
Contributor

I haven't made any changes to the file, but the files change on each run.

When I do a diff, I can see the hash has been reordered:

diff /etc/sensu/conf.d/checks/puppet-running.json /tmp/puppet-running.json
5,7c5
<       "subscribers": [
<         "base"
<       ],

---
>       "refresh": 1800,
9d6
<       "command": "/etc/sensu/plugins/check_puppet_agent -s /var/log/puppet_last_run_summary.yaml -r /var/run/puppet/agent_disabled.lock",
11,12c8,12
<       "refresh": 1800,
<       "interval": 360

---
>       "interval": 360,
>       "command": "/etc/sensu/plugins/check_puppet_agent -s /var/log/puppet_last_run_summary.yaml -r /var/run/puppet/agent_disabled.lock",
>       "subscribers": [
>         "base"
>       ]

My check config looks like this:

::sensu::check {'puppet-running':
    command     => '/etc/sensu/plugins/check_puppet_agent -s /var/log/puppet_last_run_summary.yaml -r /var/run/puppet/agent_disabled.lock',
    standalone  => false,
    subscribers => ['base'],
    interval    => 360,
    custom      => {
      'event_description' => 'There is a problem with the puppet agent on this server. Please see wiki page for more information',
      'refresh'           => '1800',
      'occurrences'       => '2',
    }
  }

I'm not sure if it's the custom params or the check itself that's causing this, but I see there have been previous issues related to it.

@jlambert121
Copy link
Contributor

What system are you on? What version of sensu and puppet are you using?

@jaxxstorm
Copy link
Contributor Author

@jlambert121 I am using the latest from git, and I'm on CentOS 6, using puppet 3.6.2

This has become a potentially very problematic bug, as it now means that any checks with an interval of longer than 30 minutes are not executing, as the server is getting restarted every 30 minutes.

@dgarbus
Copy link

dgarbus commented Nov 5, 2014

I saw this same thing when I attempted to update to 1.2.0 in our test environment. I'm currently locked in on 1.0 and am not experiencing the problem, so it is probably something that changed in either 1.1 or 1.2.

@jlambert121
Copy link
Contributor

I believe this is related to the custom attribute as those are the only ones of mine showing this behavior. Are you guys only seeing int on checks with the custom attribute as well?

Not sure how to fix it yet though.

@jamtur01
Copy link
Contributor

jamtur01 commented Dec 2, 2014

Closing in favor of #271

@jamtur01 jamtur01 closed this as completed Dec 2, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants