Send Email when TM1 service is down
Send Email when TM1 service is down
Hi
I have TM1 running as Windows Service.
Is there a way to send an email whenever the server crashes or comes down for any reason??
I have TM1 running as Windows Service.
Is there a way to send an email whenever the server crashes or comes down for any reason??
- George Regateiro
- MVP
- Posts: 326
- Joined: Fri May 16, 2008 3:35 pm
- OLAP Product: TM1
- Version: 10.1.1
- Excel Version: 2007 SP3
- Location: Tampa FL USA
Re: Send Email when TM1 service is down
We created a .net exe that runs on our server. It is scheduled through the windows scheduler to run every hour. This program will then send out emails if the services are not running.
Re: Send Email when TM1 service is down
Well the thing is that when a TM1 user loads a large a view or any other funny thing crashes the TM1 process, the service keeps showing as Started, so I suppose the scheduler will not detect the issue.
- George Regateiro
- MVP
- Posts: 326
- Joined: Fri May 16, 2008 3:35 pm
- OLAP Product: TM1
- Version: 10.1.1
- Excel Version: 2007 SP3
- Location: Tampa FL USA
Re: Send Email when TM1 service is down
If they are just loading a large view then the service is technically still running properly it would just appear locked up to some users trying to access the same information. As long as the service is in a started or running state I dont know that there is really anything you could do. I will have to defer to the others on the forum for this since I have never attempted the type of logging/monitoring that you are attempting.
The only thing that I can think of is tracking memory usage over a period of time and attempting to do a comparison based on that information, but that makes alot of assumptions about how your model is setup and used.You could get alot of false positives from normal usage and not just when there is a problem.
The only thing that I can think of is tracking memory usage over a period of time and attempting to do a comparison based on that information, but that makes alot of assumptions about how your model is setup and used.You could get alot of false positives from normal usage and not just when there is a problem.
-
- Posts: 51
- Joined: Thu Jul 24, 2008 6:14 am
Re: Send Email when TM1 service is down
Hi,
You have to distinguish between
a) Server crashed - the process/service terminated
b) Server does not respond - someone was writing a TI-process using WHILE and the condition can not be false, or someone opened a really, really big view and the server is locked for a couple of minutes
checking whether a) occurred is easy - just a little program reading the services on startup, fetching the PID (process id) of the desired server and checking every now and then if the PID is still in the processes (and if it is occupied by tm1sd.exe ^^). (You could also check the services every now and then and see if the PID is still the same...)
b) is tricky - the server will probably respond a bit later - or not. I guess you could use the API to log in a client (with no rights to view anything at all
) - if it fails you might have a problem - try again in p.ex 5 minutes. Failed again? Mommy should look after her little server immediately - little server might forgot how to breath ![Smile :)](./images/smilies/icon_e_smile.gif)
None of those approaches have been tested productive - usually users will complain very soon if the server won't respond...
(Although I wrote a little program listing all tm1 servers on the machine and telling me their PID - and then I started to make the poor little program really complex (reading the servers' settings) - and I could go on adding features for some days (p.ex all taken ports by tm1-servers, then all bound ports of any application and a suggestion for the next port I should use when setting up yet another tm1-server without stopping a previous one to make my co-workers annoyed
)
Hope this helped![Smile :)](./images/smilies/icon_e_smile.gif)
Lukas
You have to distinguish between
a) Server crashed - the process/service terminated
b) Server does not respond - someone was writing a TI-process using WHILE and the condition can not be false, or someone opened a really, really big view and the server is locked for a couple of minutes
checking whether a) occurred is easy - just a little program reading the services on startup, fetching the PID (process id) of the desired server and checking every now and then if the PID is still in the processes (and if it is occupied by tm1sd.exe ^^). (You could also check the services every now and then and see if the PID is still the same...)
b) is tricky - the server will probably respond a bit later - or not. I guess you could use the API to log in a client (with no rights to view anything at all
![Smile :)](./images/smilies/icon_e_smile.gif)
![Smile :)](./images/smilies/icon_e_smile.gif)
None of those approaches have been tested productive - usually users will complain very soon if the server won't respond...
(Although I wrote a little program listing all tm1 servers on the machine and telling me their PID - and then I started to make the poor little program really complex (reading the servers' settings) - and I could go on adding features for some days (p.ex all taken ports by tm1-servers, then all bound ports of any application and a suggestion for the next port I should use when setting up yet another tm1-server without stopping a previous one to make my co-workers annoyed
![Very Happy :D](./images/smilies/icon_e_biggrin.gif)
Hope this helped
![Smile :)](./images/smilies/icon_e_smile.gif)
Lukas
-
- Regular Participant
- Posts: 152
- Joined: Fri May 23, 2008 12:08 am
- OLAP Product: TM1 CX
- Version: 9.5 9.4.1 9.1.4 9.0 8.4
- Excel Version: 2003 2007
- Location: Melbourne, Australia
- Contact:
Re: Send Email when TM1 service is down
To check for case b as defined by Lukas you could also write a simple app to check tm1top log output. Where you have a thread with a long processing time and other threads start backing up with a wait status then something is up and you get the app to send the tm1 admins an email or SMS.
I can remember this being discussed on the old forum, if you do a search you might find it.
I can remember this being discussed on the old forum, if you do a search you might find it.
- bihints.com
- Posts: 52
- Joined: Tue May 20, 2008 8:56 am
- OLAP Product: TM1
- Version: 9.0.3
- Excel Version: 2003
- Contact:
Re: Send Email when TM1 service is down
Your IT department should be running some sort of network monitoring software like zabbix, nagios, zenoss...
All of these are free/multi-OS and generate reports / send out alerts when something goes down or reach predefined thresholds (low disk space, RAM, CPU hogging, you name it...)
All of these are free/multi-OS and generate reports / send out alerts when something goes down or reach predefined thresholds (low disk space, RAM, CPU hogging, you name it...)
- Steve Vincent
- Site Admin
- Posts: 1054
- Joined: Mon May 12, 2008 8:33 am
- OLAP Product: TM1
- Version: 10.2.2 FP1
- Excel Version: 2010
- Location: UK
Re: Send Email when TM1 service is down
or run Ben's version of TM1top. That comes to the foreground when a server is stopped. If a server is busy then the colour of the icon in the toolbar is a good indicator, but i usually get a call from a user before i notice it anyway. Unless its me causing the holdup ![Wink ;)](./images/smilies/icon_e_wink.gif)
![Wink ;)](./images/smilies/icon_e_wink.gif)
If this were a dictatorship, it would be a heck of a lot easier, just so long as I'm the dictator.
Production: Planning Analytics 64 bit 2.0.5, Windows 2016 Server. Excel 2016, IE11 for t'internet
Production: Planning Analytics 64 bit 2.0.5, Windows 2016 Server. Excel 2016, IE11 for t'internet
- Eric
- MVP
- Posts: 373
- Joined: Wed May 14, 2008 1:21 pm
- OLAP Product: TM1
- Version: 9.4
- Excel Version: 2003
- Location: Chicago, IL USA
Re: Send Email when TM1 service is down
???? Never heard of thisrun Ben's version of TM1top
![Uber Geek :ugeek:](./images/smilies/icon_e_ugeek.gif)
Regards,
Eric
Blog: http://tm1-tipz.blogspot.com
Articles: http://www.google.com/reader/shared/use ... /label/TM1
Production: 32 bit 9.0 SP2, Windows 2000 Advanced Server. Web: 32 bit 9.0 SP2, Windows 2000 Server. Excel 2003
Eric
Blog: http://tm1-tipz.blogspot.com
Articles: http://www.google.com/reader/shared/use ... /label/TM1
Production: 32 bit 9.0 SP2, Windows 2000 Advanced Server. Web: 32 bit 9.0 SP2, Windows 2000 Server. Excel 2003
-
- Community Contributor
- Posts: 125
- Joined: Wed May 28, 2008 1:22 pm
- OLAP Product: TM1, Cognos Express,..
- Version: 9.1.4 FP1
- Excel Version: 2010
- Location: Vienna
- Contact:
Re: Send Email when TM1 service is down
you can define in the service properties (services.msc) action On First,second or subsequent failures.armas wrote:Hi
I have TM1 running as Windows Service.
Is there a way to send an email whenever the server crashes or comes down for any reason??
which also can be a application,script whatever
therefore you don't need another program/service which checks the pid of the process because ms already implemented it..
of course you can use service monitor programs like nagios for such things but the windows implementation should be enough for you..
btw my settings are:
restart, restart restart
![Laughing :lol:](./images/smilies/icon_lol.gif)
/aaah damn save button
![Crying or Very Sad :cry:](./images/smilies/icon_cry.gif)
edit:
nice, my version of ben's tm1top crashes when a tm1server crashes.Steve Vincent wrote:or run Ben's version of TM1top. That comes to the foreground when a server is stopped. If a server is busy then the colour of the icon in the toolbar is a good indicator, but i usually get a call from a user before i notice it anyway. Unless its me causing the holdup
![Very Happy :D](./images/smilies/icon_e_biggrin.gif)
edit2: i really don't recommend using a solution like scheduled task which runs every xx minutes ..
- Steve Vincent
- Site Admin
- Posts: 1054
- Joined: Mon May 12, 2008 8:33 am
- OLAP Product: TM1
- Version: 10.2.2 FP1
- Excel Version: 2010
- Location: UK
Re: Send Email when TM1 service is down
Couldn't find it here so i've just uploaded it to the useful code thread, you can find it here.Eric wrote:???? Never heard of thisrun Ben's version of TM1top
I have had it crash a few times when a server has crashed too, but even then you get a windows error box pop up which is better than nothing
![Wink ;)](./images/smilies/icon_e_wink.gif)
If this were a dictatorship, it would be a heck of a lot easier, just so long as I'm the dictator.
Production: Planning Analytics 64 bit 2.0.5, Windows 2016 Server. Excel 2016, IE11 for t'internet
Production: Planning Analytics 64 bit 2.0.5, Windows 2016 Server. Excel 2016, IE11 for t'internet
- Alan Kirk
- Site Admin
- Posts: 6610
- Joined: Sun May 11, 2008 2:30 am
- OLAP Product: TM1
- Version: PA2.0.9.18 Classic NO PAW!
- Excel Version: 2013 and Office 365
- Location: Sydney, Australia
- Contact:
Re: Send Email when TM1 service is down
Provided, of course, that the crash of the service doesn't cause a Windows dialog box to pop up as described here:Martin Erlmoser wrote:you can define in the service properties (services.msc) action On First,second or subsequent failures.armas wrote:Hi
I have TM1 running as Windows Service.
Is there a way to send an email whenever the server crashes or comes down for any reason??
which also can be a application,script whatever
therefore you don't need another program/service which checks the pid of the process because ms already implemented it..
of course you can use service monitor programs like nagios for such things but the windows implementation should be enough for you..
btw my settings are:
restart, restart restart![]()
http://forums.olapforums.com/viewtopic.php?f=18&t=456
meaning that your Restart specification doesn't work until you manually go in and clear said dialog. This of course rather defeats the purpose of those otherwise-useful restart settings
![Evil or Very Mad :evil:](./images/smilies/icon_evil.gif)
"To them, equipment failure is terrifying. To me, it’s 'Tuesday.' "
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
-
- Community Contributor
- Posts: 125
- Joined: Wed May 28, 2008 1:22 pm
- OLAP Product: TM1, Cognos Express,..
- Version: 9.1.4 FP1
- Excel Version: 2010
- Location: Vienna
- Contact:
Re: Send Email when TM1 service is down
i thought that this happens only when you are connected on the console of the server - then maybe a message pops up und you have to click ok.
but normally you are not connected on the console and even nagios or a program which checks the PID of the tm1server can do anything here..
when this message pops up the tm1sd.exe is running but not working .. when you click ok the tm1sd.exe will be killed and now the server will be restarted or a program can see that the tm1server is not avaiable anymore and sends mail or whatever.
you can create a program which trys to connect to the tm1server but thats not a really good workaround (ok, it's really bad.)
i'm very happy with the MS built-in solution and for my requirements its enough.
i get these errormessages, if nobody is connected on the console, written into the eventlog and thats nice.
but normally you are not connected on the console and even nagios or a program which checks the PID of the tm1server can do anything here..
when this message pops up the tm1sd.exe is running but not working .. when you click ok the tm1sd.exe will be killed and now the server will be restarted or a program can see that the tm1server is not avaiable anymore and sends mail or whatever.
you can create a program which trys to connect to the tm1server but thats not a really good workaround (ok, it's really bad.)
i'm very happy with the MS built-in solution and for my requirements its enough.
i get these errormessages, if nobody is connected on the console, written into the eventlog and thats nice.
Re: Send Email when TM1 service is down
Does TM1 server crash often?
- Steve Rowe
- Site Admin
- Posts: 2424
- Joined: Wed May 14, 2008 4:25 pm
- OLAP Product: TM1
- Version: TM1 v6,v7,v8,v9,v10,v11+PAW
- Excel Version: Nearly all of them
Re: Send Email when TM1 service is down
I'd say the answer to this no.
In my current operational envronment which is used by my users, I don't think the server has ever crashed, possibly once or twice at most in a couple of years. I don't keep stats.
You will find people who say that TM1 crashes alot though. This is usally for two reasons.
1. They have hit or are clost to the memory limit of what their TM1 environment can cope with.
2. They are on an unstable release of the software.
If you are just starting out in TM1 it's probably a good idea not to go to the latest release and start on the latest 9.0, this advice might change when the next service pack comes out.
Cheers,
In my current operational envronment which is used by my users, I don't think the server has ever crashed, possibly once or twice at most in a couple of years. I don't keep stats.
You will find people who say that TM1 crashes alot though. This is usally for two reasons.
1. They have hit or are clost to the memory limit of what their TM1 environment can cope with.
2. They are on an unstable release of the software.
If you are just starting out in TM1 it's probably a good idea not to go to the latest release and start on the latest 9.0, this advice might change when the next service pack comes out.
Cheers,
Technical Director
www.infocat.co.uk
www.infocat.co.uk
-
- Community Contributor
- Posts: 125
- Joined: Wed May 28, 2008 1:22 pm
- OLAP Product: TM1, Cognos Express,..
- Version: 9.1.4 FP1
- Excel Version: 2010
- Location: Vienna
- Contact:
Re: Send Email when TM1 service is down
depends on the version and the skills of the developers and how you define "often"bonafiden wrote:Does TM1 server crash often?
in comparison to the mssql server - i would say definitely yes, its much more difficult to geht a mssql server crashed than a tm1server
- Steve Vincent
- Site Admin
- Posts: 1054
- Joined: Mon May 12, 2008 8:33 am
- OLAP Product: TM1
- Version: 10.2.2 FP1
- Excel Version: 2010
- Location: UK
Re: Send Email when TM1 service is down
Code: Select all
i = 1;
While ( i < 2 );
ASCIIOUTPUT ( 'ohhowwelaughed.cma' , v1 , v2 , v3 , v4 );
End;
![Wink ;)](./images/smilies/icon_e_wink.gif)
(sorry, its Monday and for some reason i found that funny...)
If this were a dictatorship, it would be a heck of a lot easier, just so long as I'm the dictator.
Production: Planning Analytics 64 bit 2.0.5, Windows 2016 Server. Excel 2016, IE11 for t'internet
Production: Planning Analytics 64 bit 2.0.5, Windows 2016 Server. Excel 2016, IE11 for t'internet