Hi all,
we followed this document to create the check about the license status for our nagiosXI:
https://assets.nagios.com/downloads/nag ... -Check.pdf
After all the step we receive this error:
Error: There is no Internet connection or api.nagios.com is down
Any Ideas?
Thanks and regards
Giorgio
NagiosXI Check License Error: There is no Internet connectio
-
lvz-nagios
- Posts: 5
- Joined: Fri Feb 12, 2021 2:44 am
Re: NagiosXI Check License Error: There is no Internet conne
Hi
What is the output when you run the following from a command line
on the Nagios XI server:
Thanks
What is the output when you run the following from a command line
on the Nagios XI server:
Code: Select all
/usr/local/nagios/libexec/check_license.sh -h-
lvz-nagios
- Posts: 5
- Joined: Fri Feb 12, 2021 2:44 am
Re: NagiosXI Check License Error: There is no Internet conne
Hi,
following the output:
[root@LVZNAGXIFEDR01 ~]# /usr/local/nagios/libexec/check_license.sh -h
check_license.sh, ver.1.3, 02/11/2020 - Nagios XI License Checker
Usage: ./check_license.sh -H <ip address> -u <username> -t <ticket> -w <warning> -c <critical>
Requirements:
*The Nagios XI server has to be connected to the Internet
*The user has to be an 'Admin' user
*The warning threshold must be greater than the critical threshold
Flags:
-H IP address
-u username
-t insecure login ticket
-w Warning threshod as int
-c Critical threshold as int
-h|--help Print help
-v Show version
Example: ./check_license.sh -H 192.168.0.100 -u nagiosadmin -t 8ALIJK2QLvuhgWaQJn3i9gI4i7nQ4L3bi49hNqnvYU6u8fkQWm95W78uuOkBPG2n -w 30 -c 15
[root@LVZNAGXIFEDR01 ~]#
following the output:
[root@LVZNAGXIFEDR01 ~]# /usr/local/nagios/libexec/check_license.sh -h
check_license.sh, ver.1.3, 02/11/2020 - Nagios XI License Checker
Usage: ./check_license.sh -H <ip address> -u <username> -t <ticket> -w <warning> -c <critical>
Requirements:
*The Nagios XI server has to be connected to the Internet
*The user has to be an 'Admin' user
*The warning threshold must be greater than the critical threshold
Flags:
-H IP address
-u username
-t insecure login ticket
-w Warning threshod as int
-c Critical threshold as int
-h|--help Print help
-v Show version
Example: ./check_license.sh -H 192.168.0.100 -u nagiosadmin -t 8ALIJK2QLvuhgWaQJn3i9gI4i7nQ4L3bi49hNqnvYU6u8fkQWm95W78uuOkBPG2n -w 30 -c 15
[root@LVZNAGXIFEDR01 ~]#
-
benjaminsmith
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Re: NagiosXI Check License Error: There is no Internet conne
Hi Giorgio,
The server will need access to verify the license. There are a few possible cases for this:
1. It's an offline installation and the internet is available. In this situation, please reach to [email protected] for instructions on the offline license activation
2. You have a firewall or another device blocking access to api.nagios.com, please ping api.nagios.com to verify this.
3. You have a proxy server enabled. If this is the case, please see the solution at the bottom of the article below.
https://support.nagios.com/kb/article.php?id=147
Let me know what you find out.
--Benjamin
The server will need access to verify the license. There are a few possible cases for this:
1. It's an offline installation and the internet is available. In this situation, please reach to [email protected] for instructions on the offline license activation
2. You have a firewall or another device blocking access to api.nagios.com, please ping api.nagios.com to verify this.
3. You have a proxy server enabled. If this is the case, please see the solution at the bottom of the article below.
https://support.nagios.com/kb/article.php?id=147
Let me know what you find out.
--Benjamin
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
lvz-nagios
- Posts: 5
- Joined: Fri Feb 12, 2021 2:44 am
Re: NagiosXI Check License Error: There is no Internet conne
Hi Benjamin,
my Nagios VM is behind a firewall but telnet is working fine:
[root@LVZNAGXIFEDR01 ~]# telnet api.nagios.com 443
Trying 50.116.21.73...
Connected to api.nagios.com.
Escape character is '^]'.
So i have connectivity.
Which port should i test?
443 is ok?
Let me know
Giorgio
my Nagios VM is behind a firewall but telnet is working fine:
[root@LVZNAGXIFEDR01 ~]# telnet api.nagios.com 443
Trying 50.116.21.73...
Connected to api.nagios.com.
Escape character is '^]'.
So i have connectivity.
Which port should i test?
443 is ok?
Let me know
Giorgio
-
benjaminsmith
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Re: NagiosXI Check License Error: There is no Internet conne
Hi Giorgio,
Hmmm...according to the error message in that part of the script, it's failing on the ping check.
What do you get if you try to ping api.nagios.com?
Also, please post the following curl output. Thanks, Benjamin
Hmmm...according to the error message in that part of the script, it's failing on the ping check.
What do you get if you try to ping api.nagios.com?
Code: Select all
ping api.nagios.com -c 3
Code: Select all
curl -k -L -v api.nagios.com
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
lvz-nagios
- Posts: 5
- Joined: Fri Feb 12, 2021 2:44 am
Re: NagiosXI Check License Error: There is no Internet conne
Following the output:
[root@LVZNAGXIFEDR01 ~]# ping api.nagios.com -c 3
PING vs1.nagios.com (50.116.21.73) 56(84) bytes of data.
^C
--- vs1.nagios.com ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 40ms
[root@LVZNAGXIFEDR01 ~]# curl -k -L -v api.nagios.com
* Rebuilt URL to: api.nagios.com/
* Trying 50.116.21.73...
* TCP_NODELAY set
* Connected to api.nagios.com (50.116.21.73) port 80 (#0)
> GET / HTTP/1.1
> Host: api.nagios.com
> User-Agent: curl/7.61.1
> Accept: */*
>
< HTTP/1.1 302 Found
< Date: Wed, 15 Dec 2021 09:57:03 GMT
< Server: Apache
< Location: https://api.nagios.com/
< Vary: Accept-Encoding
< Content-Length: 207
< Content-Type: text/html; charset=iso-8859-1
<
* Ignoring the response-body
* Connection #0 to host api.nagios.com left intact
* Issue another request to this URL: 'https://api.nagios.com/'
* Trying 50.116.21.73...
* TCP_NODELAY set
* Connected to api.nagios.com (50.116.21.73) port 443 (#1)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
* CAfile: /etc/pki/tls/certs/ca-bundle.crt
CApath: none
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.2 (IN), TLS handshake, Certificate (11):
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
* TLSv1.2 (IN), TLS handshake, Server finished (14):
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
* TLSv1.2 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.2 (OUT), TLS handshake, Finished (20):
* TLSv1.2 (IN), TLS handshake, Finished (20):
* SSL connection using TLSv1.2 / ECDHE-RSA-AES256-GCM-SHA384
* ALPN, server did not agree to a protocol
* Server certificate:
* subject: CN=*.nagios.com
* start date: May 27 00:00:00 2020 GMT
* expire date: Jun 26 23:59:59 2022 GMT
* issuer: C=GB; ST=Greater Manchester; L=Salford; O=Sectigo Limited; CN=Sectigo RSA Domain Validation Secure Server CA
* SSL certificate verify ok.
> GET / HTTP/1.1
> Host: api.nagios.com
> User-Agent: curl/7.61.1
> Accept: */*
>
< HTTP/1.1 200 OK
< Date: Wed, 15 Dec 2021 09:57:04 GMT
< Server: Apache
< Set-Cookie: api_session=c4gavmskusp5s3b7qn2usvh23qad87dd; path=/; HttpOnly
< Expires: Thu, 19 Nov 1981 08:52:00 GMT
< Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
< Pragma: no-cache
< Vary: Accept-Encoding
< Content-Length: 3998
< Content-Type: text/html; charset=UTF-8
<
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<!-- Produced by Nagios. Copyyright (c) 2017-2021 Nagios Enterprises, LLC (www.nagios.com). All Rights Reserved. -->
<title>Welcome · Nagios API</title>
<link rel="icon" type="image/png" sizes="32x32" href="https://api.nagios.com/static/images/favicon-32x32.png">
<link type="text/css" href="https://api.nagios.com/static/css/bootstrap.min.css" rel="stylesheet" /><link type="text/css" href="https://api.nagios.com/static/css/sumoselect.min.css" rel="stylesheet" /><link type="text/css" href="https://api.nagios.com/static/css/font-awesome.min.css" rel="stylesheet" /><link type="text/css" href="https://api.nagios.com/static/css/main.css" rel="stylesheet" /> <script type="text/javascript" src="https://api.nagios.com/static/js/jquery ... pt><script type="text/javascript" src="https://api.nagios.com/static/js/bootst ... pt><script type="text/javascript" src="https://api.nagios.com/static/js/jquery ... pt><script type="text/javascript" src="https://api.nagios.com/static/js/main.js"></script> </head>
<body>
<div id="wrapper">
<div class="content">
<style type="text/css">
.container { margin: 0 auto; padding-top: 120px; }
</style>
<div class="container">
<div class="row">
<div class="col-sm-12">
<h1 style="font-weight: bold;">Nagios API</h1>
<div class="section-sm">
<h4>Purpose</h4>
<p>This site is used to process data related to version update checks and feedback for Nagios® and other products and services developed and/or distributed by Nagios Enterprises.</p>
<p>We use this site to:</p>
<ul>
<li>Provide you with notifications of updates and new releases of Nagios and other products and services.</li>
<li>Collect feedback from you regarding Nagios and other products and services.</li>
<li>Track the numbers of Nagios® installations worldwide to help provide updates and security fixes.</li>
</ul>
</div>
<div class="section-sm">
<h4>Privacy</h4>
<p>We value your privacy and process any data sent to this server in accordance with our <a href="https://www.nagios.com/legal/privacypolicy/">Privacy Policy</a>.</p>
</div>
<div class="section-sm">
<h4>Usage</h4>
<p>Use of this website, and the services offered by it are subject to our website <a href="https://www.nagios.org/legal/termsofuse/" title="Terms of Use">Terms of Use</a> and <a href="https://www.nagios.org/legal/trademarkpolicy/" title="Trademark Use Restrictions">Trademark Use Restrictions</a>.</p>
</div>
<div class="section-sm">
<a href="https://www.nagios.com/"><img src="https://api.nagios.com/static/images/nagios-logo.png" style="width: 120px; float: left; margin: 5px 20px 10px 0;"></a>
<div>Nagios and Nagios graphics are the servicemarks, trademarks, or registered trademarks owned by Nagios Enterprises.</div>
<div>Website Copyright © 2000-2021 Nagios Enterprises, LLC. All rights reserved.</div>
<div style="margin-top: 10px;">
<a href="https://www.nagios.com/legal/privacypolicy/" title="Privacy Policy">Privacy Policy</a> ·
<a href="https://www.nagios.com/legal/trademarkpolicy/" title="Trademark Use Restrictions">Trademark Use Restrictions</a> ·
<a href="https://www.nagios.com/legal/termsofuse/" title="Terms of Use">Terms of Use</a>
</div>
<div class="clear"></div>
</div>
</div>
</div>
</div>
</div>
</div>
* Connection #1 to host api.nagios.com left intact
[root@LVZNAGXIFEDR01 ~]# ping api.nagios.com -c 3
PING vs1.nagios.com (50.116.21.73) 56(84) bytes of data.
^C
--- vs1.nagios.com ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 40ms
[root@LVZNAGXIFEDR01 ~]# curl -k -L -v api.nagios.com
* Rebuilt URL to: api.nagios.com/
* Trying 50.116.21.73...
* TCP_NODELAY set
* Connected to api.nagios.com (50.116.21.73) port 80 (#0)
> GET / HTTP/1.1
> Host: api.nagios.com
> User-Agent: curl/7.61.1
> Accept: */*
>
< HTTP/1.1 302 Found
< Date: Wed, 15 Dec 2021 09:57:03 GMT
< Server: Apache
< Location: https://api.nagios.com/
< Vary: Accept-Encoding
< Content-Length: 207
< Content-Type: text/html; charset=iso-8859-1
<
* Ignoring the response-body
* Connection #0 to host api.nagios.com left intact
* Issue another request to this URL: 'https://api.nagios.com/'
* Trying 50.116.21.73...
* TCP_NODELAY set
* Connected to api.nagios.com (50.116.21.73) port 443 (#1)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
* CAfile: /etc/pki/tls/certs/ca-bundle.crt
CApath: none
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.2 (IN), TLS handshake, Certificate (11):
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
* TLSv1.2 (IN), TLS handshake, Server finished (14):
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
* TLSv1.2 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.2 (OUT), TLS handshake, Finished (20):
* TLSv1.2 (IN), TLS handshake, Finished (20):
* SSL connection using TLSv1.2 / ECDHE-RSA-AES256-GCM-SHA384
* ALPN, server did not agree to a protocol
* Server certificate:
* subject: CN=*.nagios.com
* start date: May 27 00:00:00 2020 GMT
* expire date: Jun 26 23:59:59 2022 GMT
* issuer: C=GB; ST=Greater Manchester; L=Salford; O=Sectigo Limited; CN=Sectigo RSA Domain Validation Secure Server CA
* SSL certificate verify ok.
> GET / HTTP/1.1
> Host: api.nagios.com
> User-Agent: curl/7.61.1
> Accept: */*
>
< HTTP/1.1 200 OK
< Date: Wed, 15 Dec 2021 09:57:04 GMT
< Server: Apache
< Set-Cookie: api_session=c4gavmskusp5s3b7qn2usvh23qad87dd; path=/; HttpOnly
< Expires: Thu, 19 Nov 1981 08:52:00 GMT
< Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
< Pragma: no-cache
< Vary: Accept-Encoding
< Content-Length: 3998
< Content-Type: text/html; charset=UTF-8
<
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<!-- Produced by Nagios. Copyyright (c) 2017-2021 Nagios Enterprises, LLC (www.nagios.com). All Rights Reserved. -->
<title>Welcome · Nagios API</title>
<link rel="icon" type="image/png" sizes="32x32" href="https://api.nagios.com/static/images/favicon-32x32.png">
<link type="text/css" href="https://api.nagios.com/static/css/bootstrap.min.css" rel="stylesheet" /><link type="text/css" href="https://api.nagios.com/static/css/sumoselect.min.css" rel="stylesheet" /><link type="text/css" href="https://api.nagios.com/static/css/font-awesome.min.css" rel="stylesheet" /><link type="text/css" href="https://api.nagios.com/static/css/main.css" rel="stylesheet" /> <script type="text/javascript" src="https://api.nagios.com/static/js/jquery ... pt><script type="text/javascript" src="https://api.nagios.com/static/js/bootst ... pt><script type="text/javascript" src="https://api.nagios.com/static/js/jquery ... pt><script type="text/javascript" src="https://api.nagios.com/static/js/main.js"></script> </head>
<body>
<div id="wrapper">
<div class="content">
<style type="text/css">
.container { margin: 0 auto; padding-top: 120px; }
</style>
<div class="container">
<div class="row">
<div class="col-sm-12">
<h1 style="font-weight: bold;">Nagios API</h1>
<div class="section-sm">
<h4>Purpose</h4>
<p>This site is used to process data related to version update checks and feedback for Nagios® and other products and services developed and/or distributed by Nagios Enterprises.</p>
<p>We use this site to:</p>
<ul>
<li>Provide you with notifications of updates and new releases of Nagios and other products and services.</li>
<li>Collect feedback from you regarding Nagios and other products and services.</li>
<li>Track the numbers of Nagios® installations worldwide to help provide updates and security fixes.</li>
</ul>
</div>
<div class="section-sm">
<h4>Privacy</h4>
<p>We value your privacy and process any data sent to this server in accordance with our <a href="https://www.nagios.com/legal/privacypolicy/">Privacy Policy</a>.</p>
</div>
<div class="section-sm">
<h4>Usage</h4>
<p>Use of this website, and the services offered by it are subject to our website <a href="https://www.nagios.org/legal/termsofuse/" title="Terms of Use">Terms of Use</a> and <a href="https://www.nagios.org/legal/trademarkpolicy/" title="Trademark Use Restrictions">Trademark Use Restrictions</a>.</p>
</div>
<div class="section-sm">
<a href="https://www.nagios.com/"><img src="https://api.nagios.com/static/images/nagios-logo.png" style="width: 120px; float: left; margin: 5px 20px 10px 0;"></a>
<div>Nagios and Nagios graphics are the servicemarks, trademarks, or registered trademarks owned by Nagios Enterprises.</div>
<div>Website Copyright © 2000-2021 Nagios Enterprises, LLC. All rights reserved.</div>
<div style="margin-top: 10px;">
<a href="https://www.nagios.com/legal/privacypolicy/" title="Privacy Policy">Privacy Policy</a> ·
<a href="https://www.nagios.com/legal/trademarkpolicy/" title="Trademark Use Restrictions">Trademark Use Restrictions</a> ·
<a href="https://www.nagios.com/legal/termsofuse/" title="Terms of Use">Terms of Use</a>
</div>
<div class="clear"></div>
</div>
</div>
</div>
</div>
</div>
</div>
* Connection #1 to host api.nagios.com left intact
-
lvz-nagios
- Posts: 5
- Joined: Fri Feb 12, 2021 2:44 am
Re: NagiosXI Check License Error: There is no Internet conne
I have excluded the ping part in the script and now it is ok.
Re: NagiosXI Check License Error: There is no Internet conne
That's great to hear, nice find, and thank you for posting what the resolution was! Let us know when we're okay to lock this up and mark it as resolved.