Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
IP Connectivity Checker
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Coscine
backend
scripts
IP Connectivity Checker
Commits
aa1d3afc
Commit
aa1d3afc
authored
Apr 5, 2022
by
Hanna Führ
Committed by
Sandra Westerhoff
Apr 5, 2022
Browse files
Options
Downloads
Patches
Plain Diff
Issue/2031 ip connectivity checker
parent
6d7cbd9f
Branches
Branches containing commit
Tags
Tags containing commit
2 merge requests
!2
Release: Sprint/2022 06 :robot:
,
!1
Issue/2031 ip connectivity checker
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitlab-ci.yml
+23
-0
23 additions, 0 deletions
.gitlab-ci.yml
README.md
+6
-0
6 additions, 0 deletions
README.md
ipconnectivitychecker.ps1
+62
-0
62 additions, 0 deletions
ipconnectivitychecker.ps1
with
91 additions
and
0 deletions
.gitlab-ci.yml
0 → 100644
+
23
−
0
View file @
aa1d3afc
stages
:
-
test_live
-
schedule
test_live
:
stage
:
test_live
tags
:
-
live
script
:
-
PowerShell .\ipconnectivitychecker.ps1
when
:
always
ipChecker_live
:
stage
:
schedule
variables
:
ErrorActionPreference
:
stop
tags
:
-
live
script
:
-
PowerShell .\ipconnectivitychecker.ps1
only
:
-
schedules
\ No newline at end of file
This diff is collapsed.
Click to expand it.
README.md
+
6
−
0
View file @
aa1d3afc
# IP Connectivity Checker
This script checks the ip connectivity in connection with onboarded universities using their own rds.
## Usage
*
The script runs as a daily scheduled gitlab job. It passes the pipelinie only if all ip connections are checked "ok".
*
The logs can be seen in the pipeline logs.
*
Users can set up merge requests for correcting/updating IP addresses.
This diff is collapsed.
Click to expand it.
ipconnectivitychecker.ps1
0 → 100644
+
62
−
0
View file @
aa1d3afc
function
testport
([
string
]
$srv
,
$p
,
$timeout
=
2000
){
$Error
ActionPreference
=
"SilentlyContinue"
$tcpclient
=
new-Object
system.Net.Sockets.TcpClient
$iar
=
$tcpclient
.
BeginConnect
(
$srv
,
$port
,
$null
,
$null
)
$wait
=
$iar
.
AsyncWaitHandle
.
WaitOne
(
$timeout
,
$false
)
if
(
!
$wait
)
{
$tcpclient
.
Close
()
$
global
:
pipelineFails
=
$true
Return
"Connection Timeout at "
+
(
Get-Date
)
.
ToString
()
}
else
{
$error
.
Clear
()
$tcpclient
.
EndConnect
(
$iar
)
|
out-Null
if
(
!
$?
){
$
global
:
pipelineFails
=
$true
Return
$error
[
0
]
+
(
Get-Date
)
.
ToString
()
}
$tcpclient
.
Close
()
}
Return
"ok"
}
$
global
:
pipelineFails
=
$false
echo
"********************************"
echo
" Checking IP connectivity "
echo
"********************************"
echo
"=== UDE Management ==="
$ips
=
@(
"132.252.182.129"
,
"132.252.182.130"
,
"132.252.182.131"
,
"132.252.182.132"
,
"132.252.182.133"
,
"132.252.182.134"
,
"132.252.182.135"
,
"132.252.182.136"
,
"132.252.182.137"
,
"132.252.182.138"
,
"132.252.182.139"
,
"132.252.182.140"
,
"134.91.199.65"
,
"134.91.199.66"
,
"134.91.199.67"
,
"134.91.199.68"
,
"134.91.199.69"
,
"134.91.199.70"
,
"134.91.199.71"
,
"134.91.199.72"
,
"134.91.199.73"
,
"134.91.199.74"
,
"134.91.199.75"
,
"134.91.199.76"
)
$port
=
"4443"
;
foreach
(
$ip
in
$ips
){
echo
"
$(
$ip
)
:
$port
$(
testport
$ip
-p
$port
)
"
;
}
echo
"=== UDE Data ==="
$ips
=
@(
"132.252.182.1"
,
"132.252.182.2"
,
"132.252.182.3"
,
"132.252.182.4"
,
"132.252.182.5"
,
"132.252.182.6"
,
"132.252.182.7"
,
"132.252.182.8"
,
"132.252.182.9"
,
"132.252.182.10"
,
"132.252.182.11"
,
"132.252.182.12"
,
"134.91.199.1"
,
"134.91.199.2"
,
"134.91.199.3"
,
"134.91.199.4"
,
"134.91.199.5"
,
"134.91.199.6"
,
"134.91.199.7"
,
"134.91.199.8"
,
"134.91.199.9"
,
"134.91.199.10"
,
"134.91.199.11"
,
"134.91.199.12"
)
$port
=
"9021"
;
foreach
(
$ip
in
$ips
){
echo
"
$(
$ip
)
:
$port
$(
testport
$ip
-p
$port
)
"
;
}
echo
"=== TUDO Management ==="
$ips
=
@(
"129.217.149.130"
,
"129.217.149.131"
,
"129.217.149.132"
,
"129.217.149.133"
,
"129.217.149.134"
,
"129.217.149.135"
,
"129.217.149.136"
,
"129.217.149.137"
,
"129.217.149.138"
,
"129.217.149.160"
,
"129.217.149.161"
,
"129.217.149.162"
,
"129.217.149.163"
,
"129.217.149.164"
,
"129.217.149.165"
,
"129.217.149.166"
,
"129.217.149.167"
,
"129.217.149.168"
)
$port
=
"4443"
;
foreach
(
$ip
in
$ips
){
echo
"
$(
$ip
)
:
$port
$(
testport
$ip
-p
$port
)
"
;
}
echo
"=== TUDO Data ==="
$ips
=
@(
"129.217.149.2"
,
"129.217.149.3"
,
"129.217.149.4"
,
"129.217.149.5"
,
"129.217.149.6"
,
"129.217.149.7"
,
"129.217.149.8"
,
"129.217.149.9"
,
"129.217.149.10"
,
"129.217.149.32"
,
"129.217.149.33"
,
"129.217.149.34"
,
"129.217.149.35"
,
"129.217.149.36"
,
"129.217.149.37"
,
"129.217.149.38"
,
"129.217.149.39"
,
"129.217.149.40"
)
$port
=
"9021"
;
foreach
(
$ip
in
$ips
){
echo
"
$(
$ip
)
:
$port
$(
testport
$ip
-p
$port
)
"
;
}
if
(
$pipelineFails
)
{
echo
"IP connectivity check fails at least once"
$Host
.
SetShouldExit
(
-1
)
Exit
-1
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment