forked from sp2ong/HBmonitor
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch to HBmonitor3
- Loading branch information
Showing
8 changed files
with
1,295 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# hbmonitor3 | ||
Python 3 implementation of N0MJS HBmonitor for HBlink | ||
|
||
***This software is VERY, VERY, VERY new!*** | ||
|
||
Since Python 3 is the way of the future, I'm updating the HBmonitor code from Python 2 to Python 3. | ||
|
||
__THIS SOFTWARE IS WORKING__, hopefully... | ||
|
||
Questions, comments, and complaints can be forwarded to the DVSwitch group at [DVSwitch - HBlink Subgroup](https://dvswitch.groups.io/g/HBlink/topics) | ||
|
||
If you would like to contribute to this effort, please submit updated code as a PR to this repository. | ||
|
||
***73, KC1AWV*** | ||
|
||
--- | ||
|
||
Modified version by SP2ONG 2019 | ||
|
||
--- | ||
|
||
**Socket-Based Reporting for HBlink** | ||
|
||
Over the years, the biggest request recevied for HBlink (other than call-routing/bridging tools) has been web-based diagnostics and/or statistics for the program. | ||
|
||
I strongly disagree with including the amount of overhead this would require inside HBlink -- which still runs nicely on very modest resources. That it does this, and is in Python is a point of pride for me... Just let me have this one, ok? What I have done is added some hooks to HBlink, which will be expanded over time, whereby it listens on a TCP socket and provides the raw data necessary for a "web dashboard", or really any external logging or statistics gathering program. | ||
|
||
HBmonitor is my take on a "web dashboard" for HBlink. | ||
|
||
***THIS SOFTWARE IS VERY, VERY NEW*** | ||
|
||
Right now, I'm just getting into how this should work, what does work well, what does not... and I am NOT a web applications programmer, so yeah, that javascript stuff is gonna look bad. Know what you're doing? Help me! | ||
|
||
It has now reached a point where folks who know what they're doing can probably make it work reasonably well, so I'm opening up the project to the public. | ||
|
||
***GOALS OF THE PROJECT*** | ||
|
||
Some things I'm going to stick to pretty closely. Here they are: | ||
|
||
+ HBmonitor be one process that includes a webserver | ||
+ Websockets are used for pushing data to the browser - no long-polling, etc. | ||
+ Does not provide data that's easily misunderstood | ||
|
||
***0x49 DE N0MJS*** | ||
|
||
Copyright (C) 2013-2018 Cortney T. Buffington, N0MJS <[email protected]> | ||
|
||
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. | ||
|
||
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. | ||
|
||
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
REPORT_NAME = 'Dashboard local of DMR Network' # Name of the monitored HBlink system | ||
CONFIG_INC = True # Include HBlink stats | ||
LASTHEARD_INC = True # Include Lastheard (10) | ||
HOMEBREW_INC = Ture # Include Homebrew Peers | ||
BRIDGES_INC = True # Include Bridge stats (confbrige.py) | ||
HBLINK_IP = '127.0.0.1' # HBlink's IP Address | ||
HBLINK_PORT = 4321 # HBlink's TCP reporting socket | ||
FREQUENCY = 10 # Frequency to push updates to web clients | ||
WEB_SERVER_PORT = 8080 # Has to be above 1024 if you're not running as root | ||
CLIENT_TIMEOUT = 0 # Clients are timed out after this many seconds, 0 to disable | ||
|
||
# Files and stuff for loading alias files for mapping numbers to names | ||
PATH = './' # MUST END IN '/' | ||
PEER_FILE = 'peer_ids.json' # Will auto-download from DMR-MARC | ||
SUBSCRIBER_FILE = 'subscriber_ids.json' # Will auto-download from DMR-MARC | ||
TGID_FILE = 'talkgroup_ids.json' # User provided, should be in "integer TGID, TGID name" format | ||
LOCAL_SUB_FILE = 'local_subscriber_ids.json' # User provided (optional, leave '' if you don't use it), follow the format of DMR-MARC | ||
LOCAL_PEER_FILE = 'local_peer_ids.json' # User provided (optional, leave '' if you don't use it), follow the format of DMR-MARC | ||
FILE_RELOAD = 7 # Number of days before we reload DMR-MARC database files | ||
PEER_URL = 'https://www.radioid.net/static/rptrs.json' | ||
SUBSCRIBER_URL = 'https://www.radioid.net/static/users.json' | ||
|
||
# Settings for log files | ||
LOG_PATH = './log/' # MUST END IN '/' | ||
LOG_NAME = 'hbmon.log' |
Oops, something went wrong.