Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
JR Dalrymple
/
pf_interface_usage
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
fc236cec
authored
Nov 02, 2015
by
JR Dalrymple
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated all the friendly outputs
Don't know if I've committed since perfdata, but that's in and works
parent
09ad163a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
check_snmp_usage.py
+4
-0
No files found.
check_snmp_usage.py
View file @
fc236cec
...
...
@@ -17,6 +17,8 @@
# - Add in the ability to use perfdata as a simple bandwidth
# method to create graphs in Nagios
# - SNMP v3?
# - Still don't have the logic for when the period rolls - I have about
# 29 days to figure this out :)
#
#
# Release Hitory:
...
...
@@ -266,6 +268,8 @@ elif percentageDataUsed > monthComplete:
sys
.
exit
(
1
)
else
:
print
(
'OK - You will not use all of your alloted data for this period at the current rate'
+
perfdata
)
print
(
'The month is '
+
str
(
round
(
monthComplete
,
2
))
+
'
%
complete.'
)
print
(
'The data allotment on interface '
+
interface
+
' is '
+
str
(
round
(
percentageDataUsed
,
2
))
+
'
%
used.'
)
sys
.
exit
(
0
)
...
...
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