Thanks for the sed Andreas, If anyone on the list is interested i compared include.common.h from nagios-3.4.4 with the documentation at http://www.nagios.org/developerinfo/externalcommands/ and discovered the following discrepancies:
External commands that are documented but not found in the source code: DISABLE_SERVICE_FLAP_DETECTION RESTART_PROGRAM SHUTDOWN_PROGRAM External commands that appear undocumented: NONE RESTART_PROCESS SHUTDOWN_PROCESS DELAY_HOST_SVC_NOTIFICATIONS CANCEL_HOST_DOWNTIME CANCEL_SVC_DOWNTIME CANCEL_ACTIVE_HOST_DOWNTIME CANCEL_PENDING_HOST_DOWNTIME CANCEL_ACTIVE_SVC_DOWNTIME CANCEL_PENDING_SVC_DOWNTIME CANCEL_ACTIVE_HOST_SVC_DOWNTIME CANCEL_PENDING_HOST_SVC_DOWNTIME FLUSH_PENDING_COMMANDS CHANGE_HOST_NOTIFICATION_TIMEPERIOD DEL_DOWNTIME_BY_HOST_NAME DEL_DOWNTIME_BY_HOSTGROUP_NAME DEL_DOWNTIME_BY_START_TIME_COMMENT CUSTOM_COMMAND I totally agree with Andreas, that it would be nice if there was a handler that could print commands, short description, and in an utopian world, the documentation would be generated from that so there is no need to maintain it manually. Cheers, Palli ----- Original Message ----- From: "Andreas Ericsson" <a...@op5.se> To: "Nagios Users List" <nagios-users@lists.sourceforge.net> Cc: "Páll Guðjón Sigurðsson" <pa...@ok.is>, "Nagios Developers List" <nagios-de...@lists.sourceforge.net> Sent: Saturday, February 9, 2013 5:48:29 PM Subject: Re: [Nagios-users] "distributable" downtime delete commands? On 02/08/2013 04:32 AM, Páll Guðjón Sigurðsson wrote: > Thanks a lot Paul, > > We have been achieving the same goals with pynag scripts and > DEL_SVC_DOWNTIME command. > > Is there anyone on the list that might take it into their hands to > keep documentation up to date, maybe even write a routine in nagios > to ask for every supported external command, so that external scripts > know what external commands are supported ? > It wouldn't be hard to build a command query-handler in Nagios that can list the available commands, along with a short description saying what it does. The same could be used with macros and other things we already have pre-compiled lists of. I've been meaning to write one that can handle external commands from users and reply with a result code to let people know how it actually went parsing, understanding and applying it anyway, so it'll get done eventually. Right now I'm working on something different though. > The pynag team depends on the documentation to generate library > functions, but we have found a few glitches in both external commands > docs and the nagios.cfg docs. Anyone willing to help us on "getting > it right" deserves a beer. > Use the code instead. The external commands are all listed in include/common.h, so sed -n 's/^#define CMD_\([A-Z_]*\).*/\1/p' will list all of them (although some of them are disabled internally, so you'll have to keep a list of those). -- Andreas Ericsson andreas.erics...@op5.se OP5 AB www.op5.se Tel: +46 8-230225 Fax: +46 8-230231 Considering the successes of the wars on alcohol, poverty, drugs and terror, I think we should give some serious thought to declaring war on peace. ------------------------------------------------------------------------------ Free Next-Gen Firewall Hardware Offer Buy your Sophos next-gen firewall before the end March 2013 and get the hardware for free! Learn more. http://p.sf.net/sfu/sophos-d2d-feb _______________________________________________ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null