Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openbis
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sispub
openbis
Commits
3e2f86e8
Commit
3e2f86e8
authored
4 years ago
by
Juan Fuentes
Browse files
Options
Downloads
Patches
Plain Diff
SSDM-10471 : openBIS Monitor tool
parent
5538940a
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
openbis-monitor-tool/README.md
+8
-5
8 additions, 5 deletions
openbis-monitor-tool/README.md
openbis-monitor-tool/src/main/java/ch/ethz/sis/monitor/Monitor.java
+6
-6
6 additions, 6 deletions
...nitor-tool/src/main/java/ch/ethz/sis/monitor/Monitor.java
with
14 additions
and
11 deletions
openbis-monitor-tool/README.md
+
8
−
5
View file @
3e2f86e8
# M
ICROSERVICE SERVER
#
# M
ONITOR TOOL
#
## Introduction ##
## Introduction ##
This project is supposed to be used to monitor openBIS.
This tool monitors openBIS is up making a series of API calls.
It logs in on the AS, fetches a Dataset definition from the AS and returns a file listings from the DSS.
## Build ##
## Build ##
...
@@ -20,7 +22,8 @@ openbis-monitor-tool % ./bin/openbis-monitor-tool https://openbis-eln.ethz.ch/ 3
...
@@ -20,7 +22,8 @@ openbis-monitor-tool % ./bin/openbis-monitor-tool https://openbis-eln.ethz.ch/ 3
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
sessionToken: user_id-210115124729932xA447FC439B489276083A5B201F521A6D
Login [AS]: true
isSessionActive: true
Dataset Search [AS]: true
true
File Search [DSS]: true
ALL OK: true
This diff is collapsed.
Click to expand it.
openbis-monitor-tool/src/main/java/ch/ethz/sis/monitor/Monitor.java
+
6
−
6
View file @
3e2f86e8
...
@@ -47,19 +47,19 @@ public class Monitor
...
@@ -47,19 +47,19 @@ public class Monitor
}
}
boolean
isSessionActive
=
v3
.
isSessionActive
(
sessionToken
);
boolean
isSessionActive
=
v3
.
isSessionActive
(
sessionToken
);
System
.
out
.
println
(
"sessionToken: "
+
sessionToken
);
System
.
out
.
println
(
"Login [AS]: "
+
isSessionActive
);
System
.
out
.
println
(
"isSessionActive: "
+
isSessionActive
);
// Search for the dataset
// Search for the dataset
Map
<
IDataSetId
,
DataSet
>
results
=
v3
.
getDataSets
(
sessionToken
,
Arrays
.
asList
(
new
DataSetPermId
(
args
[
4
])),
new
DataSetFetchOptions
());
Map
<
IDataSetId
,
DataSet
>
asSearchResults
=
v3
.
getDataSets
(
sessionToken
,
Arrays
.
asList
(
new
DataSetPermId
(
args
[
4
])),
new
DataSetFetchOptions
());
System
.
out
.
println
(
"Dataset Search [AS]: "
+
(
asSearchResults
.
size
()
==
1
));
DataSetFileSearchCriteria
criteria
=
new
DataSetFileSearchCriteria
();
DataSetFileSearchCriteria
criteria
=
new
DataSetFileSearchCriteria
();
criteria
.
withDataSet
().
withCode
().
thatEquals
(
args
[
4
]);
criteria
.
withDataSet
().
withCode
().
thatEquals
(
args
[
4
]);
SearchResult
<
DataSetFile
>
files
=
dssv3
.
searchFiles
(
sessionToken
,
criteria
,
new
DataSetFileFetchOptions
());
SearchResult
<
DataSetFile
>
dssFileListing
=
dssv3
.
searchFiles
(
sessionToken
,
criteria
,
new
DataSetFileFetchOptions
());
System
.
out
.
println
(
!
results
.
isEmpty
()
&&
files
.
getTotalCount
()
>
0
);
System
.
out
.
println
(
"File Search [DSS]: "
+
(
dssFileListing
.
getTotalCount
()
>
0
)
)
;
v3
.
logout
(
sessionToken
);
v3
.
logout
(
sessionToken
);
System
.
out
.
println
(
"ALL OK: "
+
(
isSessionActive
&&
(
asSearchResults
.
size
()
==
1
)
&&
(
dssFileListing
.
getTotalCount
()
>
0
)));
}
catch
(
Exception
ex
)
{
}
catch
(
Exception
ex
)
{
throw
new
RuntimeException
(
ex
);
throw
new
RuntimeException
(
ex
);
}
}
...
...
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