by

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
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
Sander Botman
@sbotman
nice!
Ilja Krauchanka
@ikrauchanka
hehe, I found, it was '/':
 %w(/store /archive).each do |drive|
pls don't think I spent so much time on search :)
Sander Botman
@sbotman
check, so it was related to your own code and not the nagios CB
Ken Schmidt
@Maigard
I agree. the timezone (and days full of meetings) make it difficult. What is not working as expected?
Deepak Kosaraju
@kkdk5535
I hope this channel is still active, haven’t seen any activity since Dec 9th
belated Happy New Year to all
Sander Botman
@sbotman
Yes
Also this year we will try to support the nagios cookbook and you are right that it's was a bit quite, we enjoyed some holidays but we are back for action ..
Jose Olcese
@jolcese
Has anyone integrated LiveStatus with a chef recipe?
Deepak Kosaraju
@kkdk5535
We did ingerate but problem is we took different path than community version for installing & configuring nagios in our environment
So I am taking best logics and practices from community version and adding them to our existing version of in house nagios cookbook.
I can definetly share the code for livestatus integration - its around attributes, package, template resource.
Sander Botman
@sbotman
I have never used livestatus, but
I'm happy to merge any PR that supports it
Jose Olcese
@jolcese
@kkdk5535 , can you please share the code? I can then create a PR on the current code
Deepak Kosaraju
@kkdk5535
@jolcese sorry didn’t notice your message - I was busy with internal requests. I am going to put the code together for livestatus and share it here
Deepak Kosaraju
@kkdk5535
Attributes
default['nagios']['user'] = "nagios"
default['nagios']['group'] = "nagios"

default['nagios']['nagios3_version'] = '3.5.1-2.el6'
default['nagios']['nagios3_packages'] = %w{ nagios-common nagios }
default['nagios']['nagios3_livestatus_version'] = '1.2.4p2-2.el6'
set['nagios']['mklivestatus']['socket'] = "/var/lib/nagios/rw/livestatus"

default['nagios']['nagios4_version'] = '4.1.1-2.el6'
default['nagios']['nagios4_packages'] = %w{ nagios-contrib nagios-devel nagios }
default['nagios']['nagios4_livestatus_version'] = '1.2.6p15-1'

default['nagios']['plugins_version'] = '2.1.1.el6'

# Enable mklivestatus for Thruk?
set['nagios']['enable_mklivestatus'] = false
set['nagios']['mklivestatus']['port'] = 6557
Recipe code
if node['roles'].include?("monitoring_nagios4")
  package_list = node['nagios']['nagios4_packages']
  package_version = node['nagios']['nagios4_version']
  livestatus_pkg_name = 'mk-livestatus'
  livestatus_version = node['nagios']['nagios4_livestatus_version']
else
  package_list = node['nagios']['nagios3_packages']
  package_version = node['nagios']['nagios3_version']
  livestatus_pkg_name = 'check-mk-livestatus'
  livestatus_version = node['nagios']['nagios3_livestatus_version']
end
…

yum_package "#{livestatus_pkg_name}" do
  version livestatus_version
end

%w{ xinetd nsca }.each do |pkg| 
  package pkg 
end

service "xinetd" do
  supports :status => true, :restart => true, :reload => true
  action [:enable, :start]
end

# and the xinetd file
cookbook_file "/etc/xinetd.d/livestatus" do
  notifies :reload, "service[xinetd]"
end
Template Code
<% if node['nagios']['enable_mklivestatus'] -%>
# need mk-livestatus for thruk
event_broker_options=-1
broker_module=/usr/lib64/mk-livestatus/mk-livestatus/livestatus.o <%= node['nagios']['log_dir'] %>/rw/livestatus
<% end %>
Deepak Kosaraju
@kkdk5535
@jolcese - I hope above gives all ideas to start and community will be benefitied from it. Good luck. Happy to assist anything related to mk-livestatus integration in community cookbook. I am still new to nagios community cookbook for most of its offereing compared to our inhouse cookbook for nagios.
Jose Olcese
@jolcese
Thanks @kkdk5535 . I'll start integrating this idea into the community recipe
Ovais Tariq
@ovaistariq
@sbotman any suggestions on how to manage delaying monitoring of hosts
for example, we want to ignore hosts via tags, but if its a new node nagios happens to discover it before that node has run the recipe that sets the tags
i have modified the _load_default_config recipe as follows
nodes.each do |n|
  # Does the node need to have a particular recipe in the run_list for it to
  # be monitored? If so search the node's run_list
  next if (not node['nagios']['search_recipe_run_list'].nil? and not n.recipe?(node['nagios']['search_recipe_run_list']))

  if n.respond_to?('tags')
    Nagios.instance.push(n) unless nagios_array(n.tags).any? { |tag| exclude_tag.include?(tag) }
  else
    Nagios.instance.push(n)
  end
end
and then defined the following attribute
default['nagios']['search_recipe_run_list’] = ‘some_cookbook::some_recipe'
Sander Botman
@sbotman
Hmmmm
Sander Botman
@sbotman
so the attribute on the nagios server will be the name of a recipe that needs to be on the runlist of all nodes that you want to monitor with nagios..
Ovais Tariq
@ovaistariq
Yes that's what I am doing right now
I couldn't find a better way of doing it otherwise
The problem with ignoring by tags is that when a node is bootstrapped it registers with the chef server but hasn't run the recipe yet