http://localhost:8080/manager/text/list
awk
to color the output, which is much more informative:awk
command is quite long and you don't want to type something like this every time:curl http://localhost:8080/manager/text/list | sort | grep ^/ | awk '{ gsub("running", "\033[32m&\033[0m"); gsub("stopped", "\033[31m&\033[0m"); gsub("\\:[0-9]+", "\033[34m&\033[0m"); gsub("^/.+:", "\033[36m&\033[0m"); gsub("[0-9]+$", "\033[33m&\033[0m"); print }'
So you can use a script, that returns you colorful list of deployments without typing any URLs and regexps:
./show-status-of-applications-tomcat.sh
There is one other case, when script is even more convinient than web manager – if your environment is running on many servers and clusters (like production, again). In that case script can show information about all clusters and servers on one page:
show-status-of-prod-applications-tomcat.sh
for that, but it's possible to merge them into one file or modify it to work with parameters (for example, give a manager URL as a parameter).All scripts are available in my GitLab repo gitlab.com/irina-ivanova/scripts and don't forget about aliases!
No comments:
Post a Comment