I am trying to pull the expiry date of my account from SD so I can create a custom app that will tell me when I am close to renewal. This app will plug into my nagios monitoring app and warn and then alert me when it's close to renewing. I know I may get an email but rather monitor this myself as well. Can someone provide me the base code in C# that would strictly retrieve the date my account will expire from SD?
Thanks.
JR
simple c# expires example?
-
- SD Board Member
- Posts: 1526
- Joined: Tue Aug 14, 2007 2:31 pm
- Location: Cedar Hill, TX
- Contact:
Re: simple c# expires example?
In this forum there's a mention of a C# example to download data. Just request 30 seconds of data to make it fast, and look in the response for the expiration date.
I also think there's a simple Perl example in this forum (as well as the XMLTV distribution in Perl). Since Nagios is mostly Perl, integration should be easy.
Of course it's overkill... probably best to alarm on a failed data load or reduced data in your application.
Robert
I also think there's a simple Perl example in this forum (as well as the XMLTV distribution in Perl). Since Nagios is mostly Perl, integration should be easy.
Of course it's overkill... probably best to alarm on a failed data load or reduced data in your application.
Robert
Re: simple c# expires example?
Thanks I'll give perl a try on the nagios system. Is docs.tms.tribune.com:80 incorrect now? Sample I found makes this call:
my $dd_service='http://docs.tms.tribune.com/tech/tmsdat ... ivery.wsdl';
I get:
Service description 'http://docs.tms.tribune.com/tech/tmsdat ... ivery.wsdl' can't be loaded: 500 Can't connect to docs.tms.tribune.com:80 (Bad hostname)
Thanks.
JR
my $dd_service='http://docs.tms.tribune.com/tech/tmsdat ... ivery.wsdl';
I get:
Service description 'http://docs.tms.tribune.com/tech/tmsdat ... ivery.wsdl' can't be loaded: 500 Can't connect to docs.tms.tribune.com:80 (Bad hostname)
Thanks.
JR
Re: simple c# expires example?
OK I got it now with a different address however what timezone is the data in? My return value is 2017-09-29T21:18:20Z but when calculating the difference between now, if I include the time need to know the timezone.
Thanks.
JR
Thanks.
JR
-
- SD Board Member
- Posts: 1526
- Joined: Tue Aug 14, 2007 2:31 pm
- Location: Cedar Hill, TX
- Contact:
Re: simple c# expires example?
new hostname is dd.schedulesdirect.org
timezone is always UTC
timezone is always UTC
Re: simple c# expires example?
Thanks. Got her working and reporting back, just need to convert my local time to UTC before the final calculation for accuracy.rmeden wrote:new hostname is dd.schedulesdirect.org
timezone is always UTC
EDIT: Looks like I don't need to change anything. Perl apparently returns localtime in UTC if you just specific you want now.
Thanks.
Steve