Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
See what's new at GitLab
4
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
C
ch7465lg-nagios
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Test Cases
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Metrics
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tobias Theebe
ch7465lg-nagios
Commits
3675b6fb
Commit
3675b6fb
authored
Sep 23, 2020
by
Tobias Theebe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add channel averages (DS/US power, DS MER, DS post-FEC RSC, US T3) to HTML, perfdata
parent
261b665e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
0 deletions
+16
-0
check_ch7465lg_v2.php
check_ch7465lg_v2.php
+16
-0
No files found.
check_ch7465lg_v2.php
View file @
3675b6fb
...
...
@@ -107,6 +107,7 @@ function getChannels($channels_type) {
if
(
$channels_type
==
'ds'
)
{
$i_ds_warn
=
0
;
$i_ds_crit
=
0
;
$ds_channel_status
=
''
;
$ds_channels_avg_pwr
=
0
;
$ds_channels_avg_mer
=
0
;
$ds_channels_avg_postrs
=
0
;
$ds_channels_html
=
'<table class="statusInfo"><tr><th>ID</th><th>Frequency</th><th>Modulation</th><th>Power</th><th>MER</th><th>Post-FEC RSC</th><th>Post-FEC CCER</th></tr><tr><td colspan="7"><hr /></td></tr>'
;
$ds_channels_perf
=
''
;
...
...
@@ -120,11 +121,19 @@ function getChannels($channels_type) {
else
{
$ds_channel_status
=
'statusOK'
;};
$ds_channel_ber
=
$ds_channel
->
PostRs
/
$ds_channel
->
PreRs
;
$ds_channels_avg_pwr
+=
$ds_channel
->
pow
;
$ds_channels_avg_mer
+=
$ds_channel
->
RxMER
;
$ds_channels_avg_postrs
+=
$ds_channel
->
PostRs
;
$ds_channels_html
.
=
'<tr><td class="'
.
$ds_channel_status
.
'">'
.
$ds_channel
->
chid
.
'</td><td>'
.
$ds_channel
->
freq
/
1000000
.
' MHz</td><td>'
.
str_replace
(
'qam'
,
'-QAM'
,
$ds_channel
->
mod
)
.
'</td><td>'
.
$ds_channel
->
pow
.
' dBmV</td><td>'
.
$ds_channel
->
RxMER
.
' dB</td><td>'
.
number_format
((
int
)
$ds_channel
->
PostRs
,
0
,
''
,
','
)
.
'</td><td>'
.
$ds_channel_ber
.
'</td></tr>'
;
$ds_channels_perf
.
=
'pwr-ch'
.
$ds_channel
->
chid
.
'='
.
$ds_channel
->
pow
.
' snr-ch'
.
$ds_channel
->
chid
.
'='
.
$ds_channel
->
RxMER
.
' postrs-ch'
.
$ds_channel
->
chid
.
'='
.
$ds_channel
->
PostRs
.
' '
;
}
$ds_channels_avg_pwr
=
number_format
(
$ds_channels_avg_pwr
/
$channels
->
ds_num
,
0
,
''
,
','
);
$ds_channels_avg_mer
=
number_format
(
$ds_channels_avg_mer
/
$channels
->
ds_num
,
3
,
'.'
,
','
);
$ds_channels_avg_postrs
=
number_format
(
$ds_channels_avg_postrs
/
$channels
->
ds_num
,
0
,
''
,
','
);
$ds_channels_html
.
=
'<tr><td><i>Avg</i></td><td colspan="2"></td><td><i>'
.
$ds_channels_avg_pwr
.
' dBmV</i></td><td><i>'
.
$ds_channels_avg_mer
.
' dB</i></td><td><i>'
.
$ds_channels_avg_postrs
.
'</i></td><td></td></tr>'
;
$ds_channels_html
.
=
'</table>'
;
$ds_channels_perf
.
=
'pwr-avg='
.
$ds_channels_avg_pwr
.
' snr-avg='
.
$ds_channels_avg_mer
.
' postrs-avg='
.
str_replace
(
','
,
''
,
$ds_channels_avg_postrs
);
echo
$ds_channels_html
.
' | '
.
$ds_channels_perf
;
doLogout
();
...
...
@@ -136,6 +145,7 @@ function getChannels($channels_type) {
else
{
$i_us_warn
=
0
;
$i_us_crit
=
0
;
$us_channel_status
=
''
;
$us_channels_avg_pwr
=
0
;
$us_channels_avg_t3
=
0
;
$us_channels_html
=
'<table class="statusInfo"><tr><th>ID</th><th>Frequency</th><th>Modulation</th><th>Type</th><th>Power</th><th>Symbol Rate</th><th>T3</th></tr><tr><td colspan="7"><hr /></td></tr>'
;
$us_channels_perf
=
''
;
...
...
@@ -146,11 +156,17 @@ function getChannels($channels_type) {
elseif
(
$us_channel
->
power
>=
52
)
{
$i_us_crit
++
;
$us_channel_status
=
'statusCRITICAL'
;}
else
{
$us_channel_status
=
'statusOK'
;}
$us_channels_avg_pwr
+=
$us_channel
->
power
;
$us_channels_avg_t3
+=
$us_channel
->
t3Timeouts
;
$us_channels_html
.
=
'<tr><td class="'
.
$us_channel_status
.
'">'
.
$us_channel
->
usid
.
'</td><td>'
.
number_format
(
$us_channel
->
freq
/
1000000
,
1
,
'.'
,
''
)
.
' MHz</td><td>'
.
str_replace
(
'qam'
,
'-QAM'
,
$us_channel
->
mod
)
.
'</td><td>'
.
$us_channel
->
channeltype
.
'</td><td>'
.
$us_channel
->
power
.
' dBmV</td><td>'
.
number_format
(
$us_channel
->
srate
*
1000
,
0
,
''
,
','
)
.
' ksps</td><td>'
.
number_format
((
int
)
$us_channel
->
t3Timeouts
,
0
,
''
,
','
)
.
'</td></tr>'
;
$us_channels_perf
.
=
'pwr-ch'
.
$us_channel
->
usid
.
'='
.
$us_channel
->
power
.
' t3-ch'
.
$us_channel
->
usid
.
'='
.
$us_channel
->
t3Timeouts
.
' '
;
}
$us_channels_avg_pwr
=
number_format
(
$us_channels_avg_pwr
/
$channels
->
us_num
,
0
,
''
,
','
);
$us_channels_avg_t3
=
number_format
(
$us_channels_avg_t3
/
$channels
->
us_num
,
0
,
''
,
','
);
$us_channels_html
.
=
'<tr><td><i>Avg</i></td><td colspan="3"></td><td><i>'
.
$us_channels_avg_pwr
.
' dBmV</i></td><td></td><td><i>'
.
$us_channels_avg_t3
.
'</i></td></tr>'
;
$us_channels_html
.
=
'</table>'
;
$us_channels_perf
.
=
'pwr-avg='
.
$us_channels_avg_pwr
.
' t3-avg='
.
$us_channels_avg_t3
;
echo
$us_channels_html
.
' | '
.
$us_channels_perf
;
doLogout
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment