Skip to content

Commit

Permalink
Merge branch 'master' of github.com:FliesLikeABrick/SmokePing into fe…
Browse files Browse the repository at this point in the history
…ature/431-ssh-pm-configurable-startup-test
  • Loading branch information
Ryan Rawdon committed Jan 30, 2025
2 parents 7cacff1 + b6cc486 commit 8b1db31
Show file tree
Hide file tree
Showing 31 changed files with 582 additions and 149 deletions.
64 changes: 64 additions & 0 deletions .github/workflows/build-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Build Test

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
build:
strategy:
matrix:
os:
- ubuntu-20.04
- ubuntu-latest
# no libssl on windows
# - windows-latest
fail-fast: false
name: ${{ matrix.os }}
runs-on: ${{ matrix.os }}

steps:
- name: Checkout
uses: actions/checkout@v3

- name: CPAN Cache
id: cpan-cache
uses: actions/cache@v3
with:
path: thirdparty
key: ${{ matrix.os }}-cpan-{{ hashFiles('**/cpanfile') }}

- name: Install dependencies
run: sudo apt-get install librrds-perl rrdtool dma

- name: Bootstrap
run: ./bootstrap

- name: Configure
run: ./configure --prefix=$HOME/test-install

- name: Make
run: make

- name: Dist
run: make dist

- name: Check Dist
run: |
make dist
tar xf *-$(cat VERSION).tar.gz
cd *-$(cat VERSION)
./configure --prefix=$HOME/test-install
cp -rp ../thirdparty/lib thirdparty/
make
make install
cd $HOME/test-install
./bin/smokeping --version
- name: Cache Prep
run: |
rm -rf thirdparty/Makefile* thirdparty/work
21 changes: 21 additions & 0 deletions .github/workflows/stale.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Mark stale issues and pull requests
# https://github.com/actions/stale
on:
schedule:
- cron: "21 4 * * *"

jobs:
stale:

runs-on: ubuntu-latest

steps:
- uses: actions/stale@v3
with:
stale-issue-message: 'This issue has become stale and will be closed automatically within 7 days. Comment on the issue to keep it alive.'
stale-pr-message: 'This pull request has become stale and will be closed automatically within 7 days. Comment on the PR to keep it alive.'
stale-issue-label: 'no-issue-activity'
stale-pr-label: 'no-pr-activity'
days-before-stale: 90
days-before-issue-close: 7
days-before-pr-close: 7
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,5 @@ etc/config.dist
thirdparty/*
!thirdparty/
!thirdparty/Makefile.am
!thirdparty/Makefile.in
*-*.*.*/
*.gz
57 changes: 57 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,3 +1,60 @@
- fix error when toggling autorefresh @jlu5
- Support parsing IPv6 output in OpenSSHJunOSPing Plugin @zimage
- Enhancement to SSHProbe allows specification of IPv4 vs IPv6 transport, #385
- InfluxDB 2.x v1 (compatibility) api doesn't set the "WWW-Authenticate" header (violating rfc7235).
Work around this issue by manually setting the Authorization header @HandyMenny
- use actual link for form submission @michaelharo
- allow to enable/disable autorefresh from ui @Fantros
- make image responsive @HinataKato
- add fix for #209 - auto create 'dyndir' structure when saving slave updates @simfishing
- add favicon (bas64) to basepage.html @rezzorix
- add "Home"-Link to basepage.html @rezzorix
- remove --insecure from curl (wget does not have it!) in configure.ac @Gunni
- add fix for curl feature checking introduced in curl 7.74 and later @matellis
- enhancement to extend color handling, making dark templates easier to do @matellis
- enhancement to remove more borders with graphborders set to no @matellis
- add "literalsearch" option to filter targets using literal strings instead
of regex @jlu5
- OpenSSH 9.8 compatibility for SSH Plugin @ermuller

2021-08-13 08:12:06 +0200 Tobias Oetiker <tobi@oetiker.ch>

- release 2.8.2
- fix spelling issues in FTPtransfer.pm
- add missing README.md to the release archive

2021-08-11 17:12:22 +0200 Tobias Oetiker <tobi@oetiker.ch>

- release 2.8.1
- fix regression with 'use FindBin' missing from the installed scripts

2021-08-06 15:46:22 +0200 Tobias Oetiker <tobi@oetiker.ch>

- release 2.8.0
- support for influxdb @mad-ady
- AnotherDNS update @parseword
- new matcher ConsecutiveLoss @rborgmaster
- lots of spelling fixes @jsoref
- update FPing commandline @lelutin
- better handling of return codes from probe binaries @lelutin
- manual page for smokeinfo @lelutin
- drop SSHv1 and rsa1 from SSH.pm @Strykar
- disable page refresh while zooming @n0rc
- overflow scrollbar @bevhost
- update url in zoom mode @dekenberg
- allow relative time entry for cropper @dekenberg
- fix config reload for slaves @stromnet
- improved template layout @bevhost
- fix edgetrigger functionality @oetiker
- fping protocol parameter optional @AID
- exploss matcher fixes @dfrli
- interface parameter for fping probe @saaly182
- pass 6th argument to edgetrigger external alerts @Ryan Rawdon
- red background for 100% loss @dagelf
- probe target in graph title @Daxtorim
- make loss colors more distinctive @Daxtorim
- calculate loss buckets based on number of 'pings' @Daxtorim

commit 0992229546c3732d12ac5af348672c58b6ad8e74
Author: Tobias Oetiker <tobi@oetiker.ch>
Date: Thu Dec 20 11:23:55 2018 +0100
Expand Down
9 changes: 2 additions & 7 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,9 @@

AUTOMAKE_OPTIONS = foreign

SUBDIRS = thirdparty doc etc htdocs lib bin
SUBDIRS = lib thirdparty bin doc etc htdocs

EXTRA_DIST = COPYRIGHT CHANGES CONTRIBUTORS LICENSE PERL_MODULES VERSION

THIRDPARTY_DIR := $(shell pwd)/thirdparty
EXTRA_DIST = COPYRIGHT CHANGES CONTRIBUTORS LICENSE cpanfile VERSION README.md

dist-hook:
$(PERL) -i -p -e '"$(PACKAGE_VERSION)" =~ /(\d+)\.(\d+)\.(\d+)/ and $$v = sprintf("%d.%03d%03d",$$1,$$2,$$3) and s/^\$$VERSION\s*=\s*".*?"/\$$VERSION = "$$v"/' $(distdir)/lib/Smokeping.pm

install-exec-hook:
[ ! -d $(THIRDPARTY_DIR)/lib/perl5 ] || $(CP) -fr $(THIRDPARTY_DIR)/lib/perl5/* $(DESTDIR)$(libdir)
20 changes: 0 additions & 20 deletions PERL_MODULES

This file was deleted.

23 changes: 8 additions & 15 deletions README → README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
```
____ _ ____ _
/ ___| _ __ ___ ___ | | _____| _ \(_)_ __ __ _
\___ \| '_ ` _ \ / _ \| |/ / _ \ |_) | | '_ \ / _` |
___) | | | | | | (_) | < __/ __/| | | | | (_| |
|____/|_| |_| |_|\___/|_|\_\___|_| |_|_| |_|\__, |
|___/
Authors: Tobias Oetiker <tobi of oetiker.ch>
Niko Tyni <ntyni with iki.fi>
```

Original Authors: Tobias Oetiker <tobi of oetiker.ch> and Niko Tyni <ntyni with iki.fi>

SmokePing is a latency logging and graphing and
alerting system. It consists of a daemon process which
organizes the latency measurements and a CGI which
presents the graphs.
[![Build Test](https://github.com/oetiker/SmokePing/actions/workflows/build-test.yaml/badge.svg)](https://github.com/oetiker/SmokePing/actions/workflows/build-test.yaml)

SmokePing is a latency logging and graphing and
alerting system. It consists of a daemon process which
organizes the latency measurements and a CGI which
presents the graphs.

SmokePing is ...
================
Expand All @@ -29,15 +31,6 @@ SmokePing is ...
* able to deal with DYNAMIC IP addresses as used with
Cable and ADSL internet.

Do you like it
==============

If you like SmokePing, and want to show your appreciation for
the work I am doing (SmokePing like MRTG and RRDtool have
been written entirely in my spare time) please feel free to
use:

http://tobi.oetiker.ch/wish

cheers
tobi
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.7.3
2.8.2
3 changes: 1 addition & 2 deletions bin/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@
dist_bin_SCRIPTS = smokeinfo smokeping smokeping_cgi tSmoke

install-exec-hook:
test "$(PERL5LIB)" = "" || cd "$(DESTDIR)$(bindir)" && $(PERL) -i -p -e 's{^#!.*}{#!$(PERL)}; s{.*# PERL5LIB}{use lib (split /:/, q{$(PERL5LIB)}); # PERL5LIB}' $(dist_bin_SCRIPTS)
test "$(PERL5LIB)" = "" || cd "$(DESTDIR)$(bindir)" && $(PERL) -i -p -e 's{.*# PERL5LIB}{use lib (split /:/, q{$(PERL5LIB)}); # PERL5LIB}' $(dist_bin_SCRIPTS)
cd "$(DESTDIR)$(bindir)" && $(PERL) -i -p -e 's{.*# LIBDIR}{use lib qw($(libdir)); # LIBDIR}' $(dist_bin_SCRIPTS)
cd "$(DESTDIR)$(bindir)" && $(PERL) -i -p -e 's{^#!.*perl.*}{#!$(PERL)};' $(dist_bin_SCRIPTS)

# EOF
2 changes: 1 addition & 1 deletion bin/smokeping
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
use strict;
use warnings;

use lib (split /:/, q{}); # PERL5LIB
use FindBin;
use lib (split /:/, q{}); # PERL5LIB
use lib "$FindBin::RealBin/../lib";use lib "$FindBin::RealBin/../thirdparty/lib/perl5"; # LIBDIR

use Smokeping;
Expand Down
2 changes: 1 addition & 1 deletion bin/smokeping_cgi
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
use strict;
use warnings;

use lib (split /:/, q{}); # PERL5LIB
use FindBin;
use lib (split /:/, q{}); # PERL5LIB
use lib "$FindBin::RealBin/../lib";use lib "$FindBin::RealBin/../thirdparty/lib/perl5"; # LIBDIR

# don't bother with zombies
Expand Down
5 changes: 3 additions & 2 deletions bin/tSmoke
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ use warnings;
# Point the lib variables to your implementation

use lib (split /:/, q{}); # PERL5LIB
use FindBin;use lib "$FindBin::RealBin/../lib";use lib "$FindBin::RealBin/../thirdparty/lib/perl5"; # LIBDIR
use FindBin;
use lib "$FindBin::RealBin/../lib";use lib "$FindBin::RealBin/../thirdparty/lib/perl5"; # LIBDIR


use Smokeping;
Expand All @@ -63,7 +64,7 @@ use Pod::Usage;
use RRDs;

# Point to your Smokeping config file
my $cfgfile = "etc/config.dist";
my $cfgfile = (shift @ARGV) || "$FindBin::Bin/../etc/config";

# global variables
my $cfg;
Expand Down
11 changes: 4 additions & 7 deletions configure.ac
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2011 Tobi Oetiker
# Copyright (C) 2021 Tobi Oetiker
#
# 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
Expand All @@ -22,10 +22,7 @@ AC_PREREQ([2.59])
AC_CONFIG_AUX_DIR(conftools)

# need this to allow long path names
AM_INIT_AUTOMAKE([1.9 tar-ustar foreign no-dependencies no-installinfo no-texinfo.tex nostdinc ])
AM_MAINTAINER_MODE

m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
AM_INIT_AUTOMAKE([1.9 tar-ustar foreign])

AC_PREFIX_DEFAULT(/opt/$PACKAGE_NAME-$PACKAGE_VERSION)

Expand All @@ -37,7 +34,7 @@ AC_PATH_PROG(WGET, wget, no)
URL_CAT="neither curl nor wget found"

if test -x "$CURL"; then
URL_CAT="$CURL --location --insecure"
URL_CAT="$CURL --location"
else
if test -x "$WGET"; then
URL_CAT="$WGET -O -"
Expand Down Expand Up @@ -71,7 +68,7 @@ AC_PATH_PROG(RM, rm, no)
AC_PATH_PROG(RMDIR, rmdir, no)
AC_PATH_PROG(MKDIR, mkdir, no)
AC_PATH_PROG(FIND, find, no)
AC_PATH_PROG(SENDMAIL, sendmail, /path/to/sendmail, [$PATH$PATH_SEPARATOR/usr/sbin$PATH_SEPARATOR/usr/lib])
AC_PATH_PROG(SENDMAIL, sendmail, /path/to/sendmail, $PATH:/usr/sbin:/usr/lib)
AC_PATH_PROGS(NROFF, [gnroff nroff])

AC_ARG_VAR(GMAKE, [Path to local GNU Make binary])
Expand Down
24 changes: 24 additions & 0 deletions cpanfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
requires 'FCGI';
requires 'CGI';
requires 'CGI::Fast';
requires 'Config::Grammar';
requires 'Socket6';
requires 'IO::Socket::SSL';
requires 'Digest::HMAC_MD5';
requires 'Net::Telnet';
requires 'Net::OpenSSH';
requires 'Net::SNMP';
requires 'Net::LDAP';
requires 'Net::DNS';
requires 'IO::Pty';
requires 'LWP';
requires 'Authen::Radius';
requires 'Path::Tiny';
requires 'MIME::Base64';
requires 'InfluxDB::HTTP';
requires 'InfluxDB::LineProtocol';
# JSON::MaybeXS and Object::Result are required by InfluxDB::HTTP but were not
# listed in that lib's dependencies, so we need to cover for them here.
# See: https://github.com/raphaelthomas/InfluxDB-HTTP/issues/10
requires 'JSON::MaybeXS';
requires 'Object::Result';
11 changes: 10 additions & 1 deletion etc/basepage.html.dist
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
<!DOCTYPE html>
<html>
<head>
<link href="data:image/x-icon;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH1gQSFA8qQC+y8wAAAB10RVh0Q29tbWVudABDcmVhdGVkIHdpdGggVGhlIEdJTVDvZCVuAAABd0lEQVQoz5WSy07CQBSGTzuF6Y1buQSiCYSgYli7MC54AZc+gC/CE7kzrPQBjDsNIdF4I8oCwr1gO51OOy4aAbGS+K/OTM6X85/5R2g0GvAfSesHjPyj3LyasrIKxch3fXHiSN0Fvv4wbCZuAobsnld7Scw4wIhEhiSCEc/IbgqzZicTMuG0NEpi9jhRLzuZOUXBJRK4ITOfr1yIy6oYIwDQ7KSX3QDgcWFgR9ZtrwCLIQAoJ8j2pVG9Xg8qDsJe0j5MWcW4g5FvMUQ8cRvQXeAplXY0mlfpftI+zpu1tBURed/CHhdCAADoWfiml3gxlYUraZKXVdxKwq6lPx8mqvM97QcQaEalV1O57cffTGVXdzKKa8isNdI3l/6tzly+eM4BQDlOQl4pVEECLDSHUowUNCqsdedVelYZAEB7rIUkfVKYHaQs4okTIjEuJKJePMoCY1fvRghwN9R9gIJKs4orCtxm6Gmq3I/01lDnob+1PdbWR/+lL5mtm+fskIeBAAAAAElFTkSuQmCC" rel="icon" type="image/x-icon" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<META http-equiv="Refresh" content="<##step##>">
<title>SmokePing Latency Page for <##title##></title>
<link rel="stylesheet" type="text/css" href="css/smokeping-print.css" media="print">
<link rel="stylesheet" type="text/css" href="css/smokeping-screen.css" media="screen">
<script>
window.options = {
step: <##step##>
}
</script>
</head>
<body id="body">

Expand All @@ -17,6 +22,9 @@
</div>

<div class="sidebar-menu">
<br><br>
<ul class="menu">
<li class="menuitem"><a class="menulink" href="/"><B>HOME</B></a></li></ul>
<##menu##>
<div class="logo">
<##rrdlogo##>
Expand All @@ -26,6 +34,7 @@

<div class="navbar">
<div class="navbar-menu"><a id="menu-button" href="#">Toggle Menu</a></div>
<div class="navbar-refresh"><a id="refresh-button" href="#">Auto Refresh</a></div>
<div class="navbar-user"><div class="icon-person"></div><##authuser##></div>
</div>

Expand Down
2 changes: 2 additions & 0 deletions etc/config.dist.in
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ AVERAGE 0.5 144 2400
template = @prefix@/etc/basepage.html.dist
htmltitle = yes
graphborders = no
# If enabled, treat all filter menu queries as literal strings instead of regex
literalsearch = no

+ charts

Expand Down
Loading

0 comments on commit 8b1db31

Please sign in to comment.