Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7762973
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T14:32:51+00:00 2026-06-01T14:32:51+00:00

Below is my recipe for installing monit. I am running chef client every 60

  • 0

Below is my recipe for installing monit. I am running chef client every 60 seconds to debug.

Chef if restarting monit evry 60 seconds. No do I stop that? I thought chef will restart if change a templete.

[Fri, 30 Mar 2012 06:12:18 +0000] INFO: Processing package[monit] action install (monit::default line 5)
[Fri, 30 Mar 2012 06:12:18 +0000] INFO: Processing service[monit] action enable (monit::default line 9)
[Fri, 30 Mar 2012 06:12:18 +0000] INFO: Processing service[monit] action start (monit::default line 9)
[Fri, 30 Mar 2012 06:12:18 +0000] INFO: Processing template[monitrc] action create (monit::default line 14)
[Fri, 30 Mar 2012 06:12:18 +0000] INFO: template[monitrc] mode changed to 644
[Fri, 30 Mar 2012 06:12:18 +0000] INFO: template[monitrc] sending restart action to service[monit] (immediate)
[Fri, 30 Mar 2012 06:12:18 +0000] INFO: Processing service[monit] action restart (monit::default line 9)
[Fri, 30 Mar 2012 06:12:22 +0000] INFO: service[monit] restarted
[Fri, 30 Mar 2012 06:12:22 +0000] INFO: Processing template[monitstart] action create (monit::default line 25)



package "monit" do
  action :install
end

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

template "monitrc" do
  path "/etc/monit/monitrc"
  source "monitrc.erb"
  owner "root"
  group "root"
  mode "0644"
  #notifies :restart, resources(:service => "monit")
  #notifies :restart, "service[monit]"
  notifies :restart, resources(:service => "monit"), :immediate
end

template "monitstart" do
  path "/etc/default/monit"
  source "monit.erb"
  owner "root"
  group "root"
  mode "0644"
  notifies :restart, "service[monit]"
  #notifies :restart, resources(:service => "monit"), :immediate
end
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T14:32:52+00:00Added an answer on June 1, 2026 at 2:32 pm

    Every time monit service restarts it changes the file /etc/monit/monitrc permission to 600 so only root can read e write it, probably some sort of security reinforcement.

    But when your recipe runs it changes the permission to 644, restarting the service which puts the file back with 600. It’s like a dog chasing his own tail.

    A simple solution would be to change your recipe to apply 600 on the template avoiding the restart.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using the below to sync my github repo in my chef recipe.
I get the below error message in android. Finalizing a Cursor that has not
Below is my code for Linux. I am implementing a client/server application and below
The code below is based on this recipe . However, the key point of
Below is the code of my adapter that allows to create a popup with
I have an image displayed using CGRect (code below). the problem is that it's
Below I have a very simple example of what I'm trying to do. I
Below are two ways of reading in the commandline parameters. The first is the
Below is my current char* to hex string function. I wrote it as an
Below is part of the XML which I am processing with PHP's XSLTProcessor :

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.