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
    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
    Sander Botman
    @sbotman
    That should not be any problem. But because you are calling out the nagios recipe, you also get the default configuration settings and this creates the pagerduty user.
    With your wrapper script you only update the users again with some information, but at that moment the pagerduty user is already created within the model
    You can also disable the default configuration by setting the attribute node['nagios']['server']['load_default_config'] = false
    within your wrapper cookbook....
    jhammerman79
    @jhammerman79
    I'll look into that - just for clarity though, at that point I am abandoning search and committing to defining data bags for my Nagios configuration objects?
    Also, looking a tthe diff for the pagerdutyfix ibranch, it looks like I will have to use a nagios_contactgroups databag if I want pagerduty to be a member of any contact groups?
    Sander Botman
    @sbotman
    no... that's not needed..
    oke, here is the compare
    you can disable databag and the default config by setting the attributes:
    default['nagios']['server']['load_default_config'] = false
    default['nagios']['server']['load_databag_config'] = false
    jhammerman79
    @jhammerman79
    Oh I see - I need a pagerduty user
    Sander Botman
    @sbotman
    then you just copy the load_default_config logic within your wrapper cookbook and modify it to your wishes..
    jhammerman79
    @jhammerman79
    OK sbotman, I will get started on all of that and reach out when I have an update
    Sander Botman
    @sbotman
    I will see if I can merge the pagerduty branch tonight...
    still need to test that branch if all goes well, so your help with this is really appreciated.
    jhammerman79
    @jhammerman79
    As is yours!
    :)
    Sander Botman
    @sbotman
    sure, no problem.
    jhammerman79
    @jhammerman79
    OK, minor update - turning off load_default_config causes the contact.cfg to render correctly - it's a safe bet that the weirdness we were seeing has something to do with Chef resource cloning behavior
    Making a dependency on your branch and reproducing all of the logic of _load_default_config in my wrapper cookbook
    Sander Botman
    @sbotman
    Oke, I have to go now... please keep me posted :) and Tnx!
    jhammerman79
    @jhammerman79
    OK, tkae care
    jhammerman79
    @jhammerman79

    Hmm, I can't clone the branch:

    Josephs-MacBook-Pro-3:tmp jhammerman$ git clone https://github.com/tas50/nagios/tree/pagerduty-fix
    Cloning into 'pagerduty-fix'...
    fatal: repository 'https://github.com/tas50/nagios/tree/pagerduty-fix/' not found

    Joshua Seidel
    @blueharford
    hey @sbotman
    Sander Botman
    @sbotman
    Hey
    So updating the attributes will be the easiest way for the moment.....
    Joshua Seidel
    @blueharford
    but reading through that site, it looks like that will give it full access
    Sander Botman
    @sbotman
    Hmm let me look again...
    Sander Botman
    @sbotman
    but how is you setup handled at the moment? do admins/users have their own login account?
    Joshua Seidel
    @blueharford
    admins do, per your wiki
    but if i do the same thing for the other users, they will be able to disable stuff in the nagios UI
    Sander Botman
    @sbotman
    Well, will need to dive into this.... Currently we don't really use the security because everything is internal.
    But I guess there must be some kind of relation between users and type of accounts...
    jhammerman79
    @jhammerman79

    Hi Nagios cookbook devs. I'm have to manually create my hosts and insert them into hostgroups at the moment, since I am in the process of bootstrapping Chef into my environment and I can't rely on search yet. I have a recipe with all of the host definitions, a la

    nagios_host 'default-host' do
    options 'name' => 'default-host',

    etc.

    The hostgroups are created, but hte host objects are not - do I need to create them as objects (r.e. obj = Nagios::Host.create('default-host'))?

    Or perhaps I need to disable the search that occurs in _load_default_config?
    jhammerman79
    @jhammerman79
    From what I can tell nagios_host doesn't create hosts. PLease let me know if I should file a ticket regarding this.