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

    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
    Sander Botman
    @sbotman
    oke, I have update the branch to the latest state
    Well, then your user array (so I think the databag) also contains a pagerduty user..
    is that correct or I'm thinking in the wrong direction?
    jhammerman79
    @jhammerman79
    Hmm, there is no nagios_users databag in my setup, it shoudl all be using search to build the arrays
    jhammerman@inf1:~/repos/Chef$ ls data_bags/
    dev README.md secrets staging
    jhammerman@inf1:~/repos/Chef$ ls data_bags/staging/
    nagios_services secrets users
    jhammerman@inf1:~/repos/Chef$ ls data_bags/staging/users/
    adhundia.json dmcnair.json jhammerman.json ksalerno.json lnguyen.json mdavis.json rdavid.json rdupas.json
    No worries, we should explore everything we can thnk of
    Sander Botman
    @sbotman
    oke, that looks good...
    knife data bag show users
    that also shows this list :)
    jhammerman79
    @jhammerman79
    Ok, one sec
    jhammerman@inf1:~/repos/Chef$ knife data bag show users
    adhundia
    dmcnair
    jhammerman
    ksalerno
    lnguyen
    mdavis
    rdavid
    rdupas
    Sander Botman
    @sbotman
    (Y)
    Oke, looks good
    jhammerman79
    @jhammerman79
    Hmm, trying to think how to wrap a branch for dependency purposes
    Sander Botman
    @sbotman
    so you still have the pagerduty user within your contacts.cfg ?
    of within your pagerduty.cfg ?
    jhammerman79
    @jhammerman79
    Yes, in both admins and admins-sms groups
    But I haven't tried using the wrapper method against your branch yet, I need to figure out how to state those dependencies in metadata.rb and the Berksfile
    Sander Botman
    @sbotman
    check, pagerduty user is coming indeed from the users_helper library. contacts << 'pagerduty' unless @node['nagios']['pagerduty']['key'].empty?
    jhammerman79
    @jhammerman79
    Agreed
    Sander Botman
    @sbotman
    So I guess you have a attribute node['nagios']['pagerduty']['key']
    jhammerman79
    @jhammerman79
    Yes
    Sander Botman
    @sbotman
    Hmm... this logic should be changed also
    jhammerman79
    @jhammerman79
    I agree - would be great to have this as a tunable
    Sander Botman
    @sbotman
    Well, just updated the branch
    jhammerman79
    @jhammerman79
    :)
    Well, I cna definitively say from my testing that I am not opening the compiled contacts.cfg back up at all
    Sander Botman
    @sbotman
    I think it might work if you add this into the berksfile: cookbook "nagios", git: "https://github.com/tas50/nagios/tree/pagerduty-fix"
    jhammerman79
    @jhammerman79
    I replaced the erb within sm-nagios witha dummy file, and the rendered file is still the one from Nagios
    OK, I will change the dependency, just wanted to look at the changes in your branch so that I knew if there were new attributes / what I shoudl call in my wrapper CB and in what manner