SCHEDULE_SERVICEGROUP_HOST_DOWNTIME command not found

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Nighthawkz
Posts: 27
Joined: Fri Oct 20, 2017 7:05 am

SCHEDULE_SERVICEGROUP_HOST_DOWNTIME command not found

Post by Nighthawkz »

Hi all

I am currently running core Version 4.0.6 & am trying to regularly set a host group in downtime - hopefully as a cron job.

looking through the docs i came across SCHEDULE_SERVICEGROUP_HOST_DOWNTIME which seems to do what i want. except i can't make it do so:lol:

If i run this:

Code: Select all

*/usr/local/nagios/var/rw/nagios/cmd SCHEDULE_SERVICEGROUP_HOST_DOWNTIME;Solaris dev servers;1110741500;1577666928;0;0;7200;test;test comment

from the shell either as root or user nagios i get "permission denied"


if i run it as a bash script (has permissions) as in the documentation here

https://assets.nagios.com/downloads/nag ... and_id=121

I get a "command not found" output

To me they're both the same thing just run in slightly different formats..but i get different error messages.

Am i missing something blindingly obvious here to get this working?

any help would be appreciated

regards
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: SCHEDULE_SERVICEGROUP_HOST_DOWNTIME command not found

Post by scottwilkerson »

Nighthawkz wrote:To me they're both the same thing just run in slightly different formats..but i get different error messages.
These are not the same thing for sure.


What is the location of your nagios.cmd on your system?

Also, can you post the output of

Code: Select all

which printf
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
Nighthawkz
Posts: 27
Joined: Fri Oct 20, 2017 7:05 am

Re: SCHEDULE_SERVICEGROUP_HOST_DOWNTIME command not found

Post by Nighthawkz »

thanks for responding


nagios.cmd is in /usr/local/nagios/var/rw

which prinft output:

/usr/bin/prinft
Nighthawkz
Posts: 27
Joined: Fri Oct 20, 2017 7:05 am

Re: SCHEDULE_SERVICEGROUP_HOST_DOWNTIME command not found

Post by Nighthawkz »

I originally posted the wrong command i was trying to use

SCHEDULE_HOSTGROUP_HOST_DOWNTIME is the one i'm looking to use

regards
mahtabalam
Posts: 9
Joined: Mon Sep 23, 2019 1:30 am

Re: SCHEDULE_SERVICEGROUP_HOST_DOWNTIME command not found

Post by mahtabalam »

Can you give me the contents of /etc/nagios/nagios.cfg
or /usr/local/nagios/nagios.cfg
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: SCHEDULE_SERVICEGROUP_HOST_DOWNTIME command not found

Post by scottwilkerson »

Nighthawkz wrote:I originally posted the wrong command i was trying to use

SCHEDULE_HOSTGROUP_HOST_DOWNTIME is the one i'm looking to use

regards
You should be able to follow the doc here but change /bin/printf to /usr/bin/prinft
https://assets.nagios.com/downloads/na ... and_id=123
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
Nighthawkz
Posts: 27
Joined: Fri Oct 20, 2017 7:05 am

Re: SCHEDULE_SERVICEGROUP_HOST_DOWNTIME command not found

Post by Nighthawkz »

@scottwilkerson:

thanks, i have read through and tried. When I try it, the log just gives this generic error:

[1570007290] EXTERNAL COMMAND: SCHEDULE_HOSTGROUP_HOST_DOWNTIME;Windows Servers;1569921625;1569943225;0;0;7200;lciav;Test Comment
[1570007290] Error: External command failed -> SCHEDULE_HOSTGROUP_HOST_DOWNTIME;Windows Servers;1569921625;1569943225;0;0;7200;lciav;Test Comment
[1570007290] External command error: Command failed
Nighthawkz
Posts: 27
Joined: Fri Oct 20, 2017 7:05 am

Re: SCHEDULE_SERVICEGROUP_HOST_DOWNTIME command not found

Post by Nighthawkz »

@mahtabalam
mahtabalam wrote:Can you give me the contents of /etc/nagios/nagios.cfg
or /usr/local/nagios/nagios.cfg

i have attached it

thanks
Attachments
config.txt
nag conf
(46.57 KiB) Downloaded 143 times
Nighthawkz
Posts: 27
Joined: Fri Oct 20, 2017 7:05 am

Re: SCHEDULE_SERVICEGROUP_HOST_DOWNTIME command not found

Post by Nighthawkz »

OK

I solved it

i was typing in the host groups name wrong :oops: apologies for wasting everyone time!

you can delete or mark this thread as solved!

thanks again!
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: SCHEDULE_SERVICEGROUP_HOST_DOWNTIME command not found

Post by scottwilkerson »

Nighthawkz wrote:OK

I solved it

i was typing in the host groups name wrong :oops: apologies for wasting everyone time!

you can delete or mark this thread as solved!

thanks again!
Great!

Locking
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
Locked