Gave that a shot, and I get back the following:
whois problemdomain1.co.uk | egrep -i
"Expires.*:|Expiration.*:|Renewal.*:|expir.*date:"
Expiry date: 06-Nov-2016
whois okaydomain.co.uk | egrep -i
"Expires.*:|Expiration.*:|Renewal.*:|expir.*date:"
Expiry date: 05-Jun-2018
whois problemdomain2.uk | egrep -i
"Expires.*:|Expiration.*:|Renewal.*:|expir.*date:"
Expiry date: 08-Mar-2017
Which I think is the expected result.
*Rich Jones* | Web Developer
Corporation Pop
21-23 Shudehill
Manchester M4 2AF
0161 838 0808
www.corporationpop.co.uk
This email message (and any attached file) is intended only for the use of
the individual or entity to whom the sender intended it to be addressed and
may contain information that constitutes a trade secret, or that is
privileged, confidential or subject to copyright. No part of it may be
circulated, quoted, or reproduced without prior written approval from
Corporation Pop Ltd. The contents of this document are strictly
confidential and owned by Corporation Pop Ltd. Copyright © Corporation Pop
Ltd. All rights reserved. Corporation Pop is a limited company registered
in England + Wales. Company number 4869229. VAT number 533 8932 26.
On 31 August 2016 at 01:13, Phil Crooker <user-e8e31cd73303@xymon.invalid> wrote:
It looks like the EXPIRESTRING compilation is empty for those domains:
EXPIRESTRING="`whois $DOMAIN | egrep -i "Expires.*:|Expiration.*:|Renewal.*:|expir.*date:" | head -n 1 | cut -d: -f2- | sed -e's/^[ ]*//'`"
Try running it manually with the various parts, eg:
whois somedomain.co.uk | egrep -i "Expires.*:|Expiration.*:|Renewal.*:|expir.*date:"
and see that at each pipe point (the '|') it actually returns something.
Compare outputs between those domains that work and those that don't.
Probably the whois output is different for the domains that don't work and
you'll probably need to adjust the above filter.
cheers, Phil
*From:* Xymon <xymon-bounces at xymon.com> on behalf of Richard Jones <
user-6806fa693bf5@xymon.invalid>
*Sent:* Tuesday, 30 August 2016 11:56 PM
*To:* xymon at xymon.com
*Subject:* [Xymon] Unusual dnsreg behaviour
Hi all.
I have recently added in the dnsreg script from the xymon.com site
https://www.xymon.com/xymon-cgi/viewconf.sh?dnsreg All appears to be
working well apart from I am getting some strange behaviour for a couple of
domains.
For some domains I am simply not receiving any data back, which is causing
the test to show red with the following line of information:
Domain somedomain.co.uk expires on
Normally I would see the expiration date here, but it simply doesn't show.
I have tested the domain using whois on the server, and this all returns
fine. So I'm not too sure why this is happening. Any ideas?
*Rich Jones* | Web Developer
Corporation Pop
21-23 Shudehill
Manchester M4 2AF
0161 838 0808
www.corporationpop.co.uk
This email message (and any attached file) is intended only for the use of
the individual or entity to whom the sender intended it to be addressed and
may contain information that constitutes a trade secret, or that is
privileged, confidential or subject to copyright. No part of it may be
circulated, quoted, or reproduced without prior written approval from
Corporation Pop Ltd. The contents of this document are strictly
confidential and owned by Corporation Pop Ltd. Copyright © Corporation Pop
Ltd. All rights reserved. Corporation Pop is a limited company registered
in England + Wales. Company number 4869229. VAT number 533 8932 26.
--
Please consider the environment before printing this e-mail
This message from ORIX Australia may contain confidential and/or
privileged information. If you are not the intended recipient, any use,
disclosure or copying of this message (or of any attachments to it) is not
authorised. If you have received this message in error, please notify the
sender immediately and delete the message and any attachments from your
system. Please inform the sender if you do not wish to receive further
communications by email.
The ORIX Australia Privacy Policy outlines what kinds of personal
information we collect and hold, how we collect and handle it and your
rights in regards to your personal information. Our Privacy Policy is
available on our website <http://www.orix.com.au>.
We do not accept liability for any loss or damage caused by any computer
viruses or defects that may be transmitted with this message. We recommend
you carry out your own checks for viruses or defects.