Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
Cronlog-viewer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
IML Open Source
Cronlog-viewer
Merge requests
!2
5850 check hostname
Code
Review changes
Check out branch
Download
Patches
Plain diff
Expand sidebar
Merged
5850 check hostname
add-instances-switcher
into
master
Overview
0
Commits
2
Pipelines
0
Changes
1
Merged
Hahn Axel (hahn)
requested to merge
add-instances-switcher
into
master
2 years ago
Overview
0
Commits
2
Pipelines
0
Changes
1
0
0
Merge request reports
Viewing commit
a474e8f4
Prev
Next
Show latest version
1 file
+
7
−
1
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
a474e8f4
check fqdn
· a474e8f4
Hahn Axel (hahn)
authored
2 years ago
classes/cronlog-renderer.class.php
+
16
−
1
View file @ a474e8f4
Edit in single-file editor
Open in Web IDE
Show full file
@@ -74,7 +74,6 @@ class cronlogrenderer extends cronlog{
if
(
!
$aData
){
$aData
=
$this
->
getServersLastLog
();
}
$sTblHead
=
''
;
$iOK
=
0
;
$iErrors
=
0
;
@@ -96,6 +95,22 @@ class cronlogrenderer extends cronlog{
$iNextRunWarn
=
$aEntry
[
'SCRIPTSTARTTIME'
]
+
((
int
)
$iTtlUsed
*
60
);
$iNextRunErr
=
$aEntry
[
'SCRIPTSTARTTIME'
]
+
(((
int
)
$aEntry
[
'SCRIPTTTL'
]
+
(
int
)
$this
->
_iExpiredJobsFailAfter
)
*
60
);
// ticket #5850 - check hostname vs. servername in logfile
$sServerFromLogfile
=
preg_replace
(
'/_.*/'
,
''
,
basename
(
$aEntry
[
'logfile'
]));
if
(
$sServerFromLogfile
!=
$aEntry
[
'server'
]){
$aErrors
[]
=
[
'Hostname?'
,
'Der Hostname im Log ['
.
$sServerFromLogfile
.
'] stimmt nicht mit Servernamen ['
.
$aEntry
[
'server'
]
.
'] überein.'
,
];
}
if
(
!
strstr
(
$sServerFromLogfile
,
"."
)){
$aErrors
[]
=
[
'No FQDN'
,
'Der Hostname im Log ['
.
$sServerFromLogfile
.
'] ist kein KFQDN.'
,
];
}
if
(
$iNextRunErr
<
date
(
"U"
)){
$aErrors
[]
=
[
'Abgelaufen'
,
Loading