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
Sander Botman
@sbotman
No, unless you want to create the nagios configuration yourself...
and create funky exceptions or other.... then you can disable the default configuration
Kristen Arnold
@karnold
gotcha, ok. let me try that and see what happens.
Sander Botman
@sbotman
the defaults are within the recipes/_load_default_config or something and recipes/_load_databag_config
so most people add databags with their checks and define within databags which checks should be executed where...
but, since i don't like databags... you can also use the nagios_blabla provider to do stuff... like you have been doing with nagios_host
still... it's strange that your node is not added to the nagios hostgroups....
Kristen Arnold
@karnold
well, i switched to the default config and i get the same result
Sander Botman
@sbotman
so, when you do knife node edit yournode -a
You can see all the details of the node and it's all populated?
or is this node created with knife node create yournode
Kristen Arnold
@karnold
it was created initially with knife bootstrap, let me check the node with the -a flag
is there something specific i should be looking for?
Sander Botman
@sbotman
euh
node['roles']
node['os']
are those empty?
Kristen Arnold
@karnold
yup, its in the proper roles, let me check os
os:linux as well
Sander Botman
@sbotman
that's strange...
well, oke...
think you will need to debug this..
Kristen Arnold
@karnold
im about to hop into a meeting. ill have to look some more in a bit
Sander Botman
@sbotman
have you used pry before?
Kristen Arnold
@karnold
i have not
Sander Botman
@sbotman
you will need to add a line here
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 ={}