Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    jhammerman79
    @jhammerman79
    Hi Nagios cookbook devs. Would anyone be able to help me unravel how to write a cookbook wrapper for the Nagios cookbook that remove the pagerduty user from certain contactgroups? Here is a pastebin with the code http://pastebin.com/ChxpM1Gd
    Sander Botman
    @sbotman
    Yes
    jhammerman79
    @jhammerman79
    When this is run, pagerduty has not been removed from the 'admins' contactgroup in the rendered file
    Hello sbotman
    Sander Botman
    @sbotman
    Hi
    What is on the runlist of the node that is the nagios server?
    jhammerman79
    @jhammerman79
    I have updated the code from the ticket that I opened to explicitly submit a variable that should be a hash containing the recomputed values, but the file is still rendered with the old values

    Here is the runlist:

    "run_list": [
    "role[loghost]",
    "role[base]",
    "role[monitoring]"

    Ah! You may have figured it out sbot man
    Here is monitoring role

    jhammerman@inf1:~/repos/Chef$ cat roles/monitoring.rb
    name "monitoring"
    description "Baseline configuration for all systems."

    run_list(
    "recipe[sm-munin::server]",
    "recipe[sm-nagios::default]",
    "recipe[nagios::pagerduty]"
    )

    default_attributes(
    )

    Sander Botman
    @sbotman
    oke and within monitoring you have this cookbook sm-nagios
    jhammerman79
    @jhammerman79
    Yes
    Well, on second thought, the nagios::pagerduty recipe doesn't call return_users anywhere
    Sander Botman
    @sbotman
    oke.. I think your problem lies in the fact that you are calling the recipe[nagios::pagerduty]
    jhammerman79
    @jhammerman79
    Hmm, if I don't call that though the pagerduty.cfg file does not get written
    Sander Botman
    @sbotman
    Correct
    jhammerman79
    @jhammerman79
    I could rearrange the order of the recipes if you think that is throwing a wrench into the system
    Sander Botman
    @sbotman
    but I was working on this on branch pagerduty-fix
    Because the Nagios model is now holding all configuration items, we also need to update the pagerduty recipe
    jhammerman79
    @jhammerman79
    Ok, shall I add a call to the pagerduty template in my default.rb?
    Sander Botman
    @sbotman
    Well... it would be great if you can test the branch: https://github.com/tas50/nagios/tree/pagerduty-fix
    I can rebase that one to the latest version just to be sure all other options are still in.
    jhammerman79
    @jhammerman79
    OK, I can pull that in - shall I alter my runlist or any of wrapper logic?
    Sander Botman
    @sbotman
    Hmmm.... let me take a look
    jhammerman79
    @jhammerman79
    Great, LMK when I should pull
    jhammerman79
    @jhammerman79
    sbotman, for what it's worth I changed the monitoring role to remove the nagios::pagerduty recipe entirely and the file is still rendered with the incorrect values