Hi,
How to write a Shell Scripting to know the services running or not in linux.
Ex: If service is stopped automatically get the mail notification "JIRA Service has stopped".
after wrote the scripting by using shell and Where to keep the scripting file in JIRA.
Hi @cmbollareddy ,
I'm not sure it answers your question or not.but you can try this out
the below rest api will give you the status of your confluence/jira service: BASE-URL/status
you can include this in your shell script and based on the result trigger mail
To check periodically set a cron job for the same
200 | {"state":"RUNNING"} | Running normally |
500 | {"state":"ERROR"} | An error state |
503 | {"state":"STARTING"} | Application is starting |
503 | {"state":"STOPPING"} | Application is stopping |
200 | {"state":"FIRST_RUN"} | Application is running for the first time and has not yet been configured |
404 | Application failed to start up in an unexpected way (the web application failed to deploy) |
BR,
Leo
I don't want to check jira service status in browser.
I need shell scripting..if service is stopped then automatically recevied an email.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can do this using curl.
curl http://localhost:8080/status | grep RUNNING > /dev/nul
[ $? -eq 0 ] && echo "Running" || echo "Error"
Obviously, you would do something other than echo based on success or failure
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.