Skip to content

Commit

Permalink
Add a "configtest" alias for configcheck
Browse files Browse the repository at this point in the history
See #838
  • Loading branch information
remh committed Mar 6, 2014
1 parent d54ef7e commit c6dd162
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ def parent_func(): agent.start_event = False
print check.get_metrics()
print check.get_events()

elif 'configcheck' == command:
elif 'configcheck' == command or 'configtest' == command:
osname = get_os()
all_valid = True
for conf_path in glob.glob(os.path.join(get_confd_path(osname), "*.yaml")):
Expand Down
6 changes: 5 additions & 1 deletion packaging/datadog-agent-base-rpm/datadog-agent-redhat
Original file line number Diff line number Diff line change
Expand Up @@ -206,13 +206,17 @@ case "$1" in
configcheck
;;

configtest)
configcheck
;;

jmx)
shift
su $AGENTUSER -c "$AGENTPATH jmx $@"
exit $?
;;
*)
echo "Usage: $0 {start|stop|restart|info|status|configcheck|jmx}"
echo "Usage: $0 {start|stop|restart|info|status|configcheck|configtest|jmx}"
exit 2
esac
exit $?
7 changes: 6 additions & 1 deletion packaging/datadog-agent-deb/datadog-agent.init
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,11 @@ case "$1" in
exit $?
;;

configtest)
su $AGENTUSER -c "$AGENTPATH configcheck"
exit $?
;;

jmx)
shift
su $AGENTUSER -c "$AGENTPATH jmx $@"
Expand All @@ -147,7 +152,7 @@ case "$1" in

*)
N=/etc/init.d/$NAME
echo "Usage: $N {start|stop|restart|info|status|configcheck|jmx}"
echo "Usage: $N {start|stop|restart|info|status|configcheck|configtest|jmx}"
exit 1
;;
esac
Expand Down

0 comments on commit c6dd162

Please sign in to comment.