Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Sep 18 2017 22:37

    shoekstra on use_nginx

    (compare)

  • Sep 18 2017 22:37

    tas50 on master

    Depend on nginx instead of chef… Use nginx >= 7.0 Merge pull request #552 from so… (compare)

  • Sep 18 2017 22:37
    tas50 closed #552
  • Sep 18 2017 22:14
    shoekstra synchronize #552
  • Sep 18 2017 22:14

    shoekstra on use_nginx

    Use nginx >= 7.0 (compare)

  • Sep 18 2017 22:12
    shoekstra commented #551
  • Sep 18 2017 22:11
    shoekstra commented #552
  • Sep 18 2017 22:11
    shoekstra commented #552
  • Sep 18 2017 22:09
    shoekstra closed #546
  • Sep 18 2017 22:09
    shoekstra commented #546
  • Sep 18 2017 22:06
    shoekstra synchronize #552
  • Sep 18 2017 22:06

    shoekstra on use_nginx

    Depend on nginx instead of chef… (compare)

  • Sep 18 2017 22:03
    shoekstra review_requested #551
  • Sep 18 2017 22:01
    shoekstra synchronize #551
  • Sep 18 2017 22:01

    shoekstra on release_8.0.0

    Release 8.0.0 (compare)

  • Sep 18 2017 22:00
    shoekstra review_requested #552
  • Sep 18 2017 22:00
    shoekstra review_requested #552
  • Sep 18 2017 22:00
    shoekstra opened #552
  • Sep 18 2017 21:59

    shoekstra on use_nginx

    Depend on nginx instead of chef… (compare)

  • Sep 18 2017 21:57
    shoekstra review_requested #551
and below the function you type: require 'pry';binding.pry
then upload the cookbook and run chef-client again on your server
this time it will stop at this location so you can type some things and inspect some veriables
Kristen Arnold
@karnold
ah perfect, thanks!
Sander Botman
@sbotman
Just let me know when you are at this stage and I will help you here
Kristen Arnold
@karnold
ok great
Kristen Arnold
@karnold
found the issue.... multi_environment_monitoring needed to be set to true.
Sander Botman
@sbotman
Aaah...
good point :thumbsup:
Kristen Arnold
@karnold
thanks your your help. pry looks pretty useful for debugging. that helped alot
Sander Botman
@sbotman
yes, you will love it and use it a lot in the future...
You can put it in any cookbook file... and don't need to worry about chef-clients that are running as a service..
it only becomes active it you run chef-client interactively
Ilja Krauchanka
@ikrauchanka

Hello guys, newbie is online again :)
the question is rather ruby area than cookbook one:
I'm converting existing nagios to chef one, a list of services have almost same checks, therefore I set them as separate list:

default_checks = [
'is_volatile' =>     '0',
'check_period' =>     '24x7',
'max_check_attempts' =>     '5',
'normal_check_interval' =>     '5',
'retry_check_interval' =>     '2',
'notification_interval' =>     '20',
'notification_period' =>     '24x7',
]

But command check is uniq for each service:

nagios_service 'disk c for all WINs' do
  options   'use' => 'data-service',
            'hostgroup_name' => 'data-db',
            'service_description' => 'disk c',
            'check_command' => 'check_nt!useDDISKSPACE!-l c -w 90 -c 95' 

end

How to combine uniq services and from the list ?
something like:

nagios_service 'disk c for all WINs' do
  options   default_checks
           'use' => 'data-service',
            'hostgroup_name' => 'data-db',
            'service_description' => 'disk c',
            'check_command' => 'check_nt!useDDISKSPACE!-l c -w 90 -c 95'

thanks!

of if we have more elegant way, please tell me
Sander Botman
@sbotman
hmm
default_checks looks more like a template...
Ilja Krauchanka
@ikrauchanka
I just defined it as a list
Sander Botman
@sbotman
If you make it a template, you can inherit those settings and override them if needed
Ilja Krauchanka
@ikrauchanka
no, the question isn't in teplates
Ilja Krauchanka
@ikrauchanka
nagios_service 'disk c for all WINs' do
  options   ({'use' => 'data-service',
            'hostgroup_name' => 'data-db',
            'service_description' => 'disk c',
            'check_command' => 'check_nt!useDDISKSPACE!-l c -w 90 -c 95' }.merge(default_checks))
end
default_checks should be a hash default_checks ={}
Ken Schmidt
@Maigard
@sbotman Have you had a chance to do some testing on that pull request?
Sander Botman
@sbotman
Well... I have been super busy
So I have ignored the cookbook for some time
Sorry about that :(
Ken Schmidt
@Maigard
No problem. I was just wondering.
I did have a question come up yesterday though. As soon as the node is created in chef, it gets added to nagios, but the first converge hasn't completed so it starts alerting because it hasn't brought the services up.
Ken Schmidt
@Maigard
Can the search be changed so it checks for an attribute that is set after the first converge? something like node["ohai_time"] or something along those lines?
Jamie Kahgee
@veilig2000
is it possible to exclude a host (or hostgroup) from a service configured through a databag?
when I try to use an exclamation to exclude (!foo) it creates a new host that starts w/ that illegal character
Sander Botman
@sbotman
That doesn't sound right :(
I will need to check it out, seems like we have missed something here...
Jamie Kahgee
@veilig2000
I was trying to track it down in ver 7.2.4 and see where it was happening, but I didn't see when/why it was happening...yet
Sander Botman
@sbotman
Would be great if you can create a ticket for this, will investigate when time permits..
Ken Schmidt
@Maigard
Excluding a host from a group is one of the pull request I submitted a few weeks ago. It should be in the next release. That said, I discovered a small bug late last week. I will have an update should fix it.
Sander Botman
@sbotman
@Maigard I did some testing on star and null branch code and think I understand the idea, only it doesn't work as expected.
Please ping me when you have time (which is hard with our time-zone difference) and maybe we can discuss...
Jamie Kahgee
@veilig2000
Is there any sort of defined release schedule? or is it whenever a good amount of updates get introduced?
Sander Botman
@sbotman
Yes, if all is tested and stable than I normally push something..
of on request, if you really really want me too :)
Jamie Kahgee
@veilig2000
I'm just waiting (and excited) on the feature to exclude a host, but sounds like there was still a kink to be worked out.
Ilja Krauchanka
@ikrauchanka
-------------
undefined method `split' for []:Array
:(
how to find wrong string, debug mode did show it
Sander Botman
@sbotman
this related to the nagios cookbook?
Ilja Krauchanka
@ikrauchanka
yes
I've started excluding recipes from default one to find wrong string