I would like to configure a my own SMS gateway in all server like SMTP Mail Server in Jira.
Is there any way using which I can achieve this functionality?
I don't think this would work the way you think it might.
Have a think about what you mean by "log in". There is an obvious one - I go to Jira and enter username/password. But I am now logged in, whatever I happen to be doing. I might have logged in, looked at an issue, and then gone off to do the rest of my job, make tea, have a nap, whatever. Later, I come back to the Jira session and look for something else - does that count as a login? There's no action associated with it, I'm already logged in. It gets worse - how would you count a login if I log into Confluence and then open the Jira that is in the same SSO realm? There's no log in at all into Jira.
You'll need to think through what you are really trying to capture here, and then probably identify a different route.
My instinct for a simple solution would be to fiddle with the log4j settings, getting it to log people hitting specific functions that need to be logged in to perform out to a separate file, then write a short script that could run regularly and read the last few minutes of file activity, and create a list of people who are "logged in" at that point. compare the list with the previous version, and ping any new names over to your SMS gateway.
As a general consultant though, my instinct is to ask "why?". Why does it matter that someone has logged into your system? Why do your managers think they need to know that?
I can imagine some use in "people are active in our systems, so I know that they are there for calls or instant messages", but you'd be far better off doing that with your chat program. And maybe "who is on call" if you're in the support team, but at that point, you probably should be using something like Opsgenie, not random text.
Hi @Bobby Loca ,
That depends a bit on how your SMS gateway works. I know systems that accept emails and translate them in to SMS message so that could be 1 option.
If that SMS gateway have an API you can use you can look in that direction. Most likely there are even already some addons available that provide this functionality
So if you have some (more) specific requirements on when you want to fire something and with what application (gateway) maybe we can help you out further :)
Hello @Dirk Ronsmans
Thank you for providing valuable response.
I want to send SMS on the users aw well as Project Leads mobile when the respective user is logged into the Jira or Confluence server.
This SMS will have the browser details from which the login is performed.
It means, on each user login SMS will be shared on multiple numbers.
This is the use case that I want achieve.
Hi @Bobby Loca , that's a very specific user case.
While I don't really see what the use would be and I can see this leading to just a spamming of sms messages, I'm also afraid I don't see a way to do that.
Capturing the login action isn't really something that is out of the box available.
Just brainstorming here but as you are on Server, perhaps you might want to look more towards log parsing?i'm sure the jira logs and access logs of your tomcat will contain some information on when a user logs in and some more details.
Perhaps capturing that by monitoring the file and sending an sms afterwards might be the most straightforward method.
Otherwise I think you might be looking at developing your own custom plugin.