Reschedule 'Check_MK' service as command

Hi all,

is there a command for reload icon “Reschedule ‘Check_MK’ service” ?
Web API dont have it, maybe one of you can tell me :slight_smile:
In Python or Bash ?
grafik

thanks in advance

br
Neeloj

Hi Neeloj,

you can try the following command as site user:

cmk --checks=checkname

or

cmk --checks=checkname hostname

1 Like

Hope it helps you

Anastasios

1 Like

And the manual

https://checkmk.com/cms_cmk_commandline.html#The%20cmk%20command

1 Like

thank you so much :slight_smile: it works like a charm, I use that with “runuser” command.

1 Like

If you want more/detailed output information, you can use -v or -vv

e.g.

cmk -v --checks=checkname hostname

or

cmk -vv --checks=checkname

1 Like

Yes I did that :-)) thank you again :slight_smile:

I use that in python script, it you have an idea tell me :-))

I use now subprocess.Popen

I can’t help you. I’m a python beginner. Sorry :slightly_smiling_face:

Ah okay :-)) anyway thanks :-))

1 Like

You can see how I do it in python here: reschedule_check in checkmk-commander.

2 Likes

Thank you @ways I’ll check it out :slight_smile:

How do you find this out:
resched_checks=Reschedule&_resched_spread=0

?

Maybe with the rule “Normal check interval for service checks”

Thanks for the info :slight_smile:
I use cmk -v --checks=checkname hostname In python, but I’ll think about @ways way too :slight_smile:

How I found out how to do it?

In the webUI for checkmk you can use developer tools in Firefox or Chromium to see what URLs are called.

1 Like

I use that but for me in version 1.5x RAW version it calls different url not like yours:

/ajax_reschedule.py?site=mysite&host=myhost&service=Check_MK+Discovery&wait_svc=Check_MK+Discovery&_ajaxid=1589544581

But why you can see other url than me, by the way it works for me

  • click on a service
  • scroll to the bottom
  • find the little icon with arrows pointing out, “url to this frame”, and click it
  • click on hammer
  • click “Reschedule active checks”

Now you will see the url I’m using.

I haven’t tried the ajax url. Perhaps it works as well.

1 Like

exactly as you said :-), thats good trick thanks :wink:

yes this works you have to add username and _secret key for automation user.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.