diff --git a/net-mgmt/Makefile b/net-mgmt/Makefile index e7fe4dcc4565..a9abaed72644 100644 --- a/net-mgmt/Makefile +++ b/net-mgmt/Makefile @@ -1,445 +1,446 @@ COMMENT = Network management tools SUBDIR += 2ping SUBDIR += TkTopNetFlows SUBDIR += adcli SUBDIR += adguard-exporter SUBDIR += aggregate SUBDIR += aircrack-ng SUBDIR += alertmanager SUBDIR += andwatch SUBDIR += ap-utils SUBDIR += argus3 SUBDIR += argus3-clients SUBDIR += arpscan SUBDIR += arpwatch SUBDIR += arts++ SUBDIR += bandwhich SUBDIR += bandwidthd SUBDIR += bgpq3 SUBDIR += bgpq4 SUBDIR += bgpuma SUBDIR += bind_exporter SUBDIR += blackbox_exporter SUBDIR += bosun SUBDIR += bpft SUBDIR += braa SUBDIR += bsnmp-regex SUBDIR += bsnmp-ucd SUBDIR += bwm-ng SUBDIR += cacti SUBDIR += cacti-spine SUBDIR += cacti88-spine SUBDIR += carbon-relay-ng SUBDIR += carbonzipper SUBDIR += cdpd SUBDIR += cdpr SUBDIR += cdpsnarf SUBDIR += centreon-clib SUBDIR += check_ipmi_sensor SUBDIR += check_logfiles SUBDIR += check_mk_agent SUBDIR += check_multi SUBDIR += check_mysql_health SUBDIR += check_nwc_health SUBDIR += check_ssl_cert SUBDIR += check_syncthing SUBDIR += check_ups_health SUBDIR += check_wg SUBDIR += chillispot SUBDIR += choparp SUBDIR += cidr SUBDIR += ciscoconf SUBDIR += clog SUBDIR += cnagios SUBDIR += collectd5 SUBDIR += confregdecode SUBDIR += coovachilli SUBDIR += cowpatty SUBDIR += cricket SUBDIR += crmsh SUBDIR += darkstat SUBDIR += devmon SUBDIR += devmon-templates SUBDIR += dhcdrop SUBDIR += dhcp_probe SUBDIR += disco SUBDIR += dnsmap SUBDIR += docsis SUBDIR += driftnet SUBDIR += ehnt SUBDIR += etherape SUBDIR += ettercap SUBDIR += fastnetmon SUBDIR += fence-agents SUBDIR += fetchconfig SUBDIR += fli SUBDIR += flow-tools SUBDIR += flowd SUBDIR += flowviewer SUBDIR += fprobe SUBDIR += geom-exporter SUBDIR += gnu-ipcalc SUBDIR += gping SUBDIR += grepcidr SUBDIR += grepip SUBDIR += grok_exporter SUBDIR += gsnmp SUBDIR += guifi-snpservices SUBDIR += hastmon SUBDIR += icinga-ipl-i18n SUBDIR += icinga-php-library SUBDIR += icinga-php-thirdparty SUBDIR += icinga2 SUBDIR += icingadb SUBDIR += icingaweb2 SUBDIR += icingaweb2-module-businessprocess SUBDIR += icingaweb2-module-cube SUBDIR += icingaweb2-module-director SUBDIR += icingaweb2-module-elasticsearch SUBDIR += icingaweb2-module-fileshipper SUBDIR += icingaweb2-module-generictts SUBDIR += icingaweb2-module-grafana SUBDIR += icingaweb2-module-graphite SUBDIR += icingaweb2-module-icingadb SUBDIR += icingaweb2-module-idoreports SUBDIR += icingaweb2-module-incubator SUBDIR += icingaweb2-module-jira SUBDIR += icingaweb2-module-map SUBDIR += icingaweb2-module-pdfexport SUBDIR += icingaweb2-module-reactbundle SUBDIR += icingaweb2-module-reporting SUBDIR += icingaweb2-module-vsphere SUBDIR += icingaweb2-module-vspheredb SUBDIR += icingaweb2-module-x509 SUBDIR += icmpmonitor SUBDIR += icmpquery SUBDIR += iftop SUBDIR += intel-snap SUBDIR += ipacctd SUBDIR += ipaudit SUBDIR += ipcad SUBDIR += ipcalc SUBDIR += ipfixcol2 SUBDIR += ipgen SUBDIR += iprange SUBDIR += ipv6calc SUBDIR += ipv6gen SUBDIR += ipv6mon SUBDIR += irrtoolset SUBDIR += isic SUBDIR += jnettop SUBDIR += kapacitor SUBDIR += kf6-networkmanager-qt SUBDIR += kismet SUBDIR += klg SUBDIR += lg SUBDIR += libfds SUBDIR += librenms SUBDIR += libsmi SUBDIR += lldpd SUBDIR += mac-telnet SUBDIR += makenl SUBDIR += mbrowse SUBDIR += mdata-client SUBDIR += metronome SUBDIR += midpoint SUBDIR += mk-livestatus SUBDIR += monitoring-plugins SUBDIR += mqtt2prometheus SUBDIR += mrtg SUBDIR += mrtg-ping-probe SUBDIR += mtrace SUBDIR += mysql-snmp SUBDIR += mysqld_exporter SUBDIR += nagios SUBDIR += nagios-certexp-plugin SUBDIR += nagios-check_bacula13 SUBDIR += nagios-check_bacula15 SUBDIR += nagios-check_clamav SUBDIR += nagios-check_cpu_usage SUBDIR += nagios-check_dhcp.pl SUBDIR += nagios-check_email_delivery SUBDIR += nagios-check_hdd_health SUBDIR += nagios-check_hp_bladechassis SUBDIR += nagios-check_mysql_slave SUBDIR += nagios-check_netsnmp SUBDIR += nagios-check_ports SUBDIR += nagios-check_postgres SUBDIR += nagios-check_puppet SUBDIR += nagios-check_relayd_status SUBDIR += nagios-check_smartmon SUBDIR += nagios-check_tftp SUBDIR += nagios-check_zpools SUBDIR += nagios-geom SUBDIR += nagios-openldap-plugins SUBDIR += nagios-pf-plugin SUBDIR += nagios-plugins SUBDIR += nagios-snmp-plugins SUBDIR += nagios-snmp-plugins-extras SUBDIR += nagios4 SUBDIR += nagiosgraph SUBDIR += nagiosql SUBDIR += nagnu SUBDIR += nagstamon SUBDIR += nagtail SUBDIR += nagvis SUBDIR += nbtscan SUBDIR += ndoutils SUBDIR += ndpmon SUBDIR += net-snmp SUBDIR += netbox SUBDIR += netbox-agent SUBDIR += netdata SUBDIR += netdisco-mibs SUBDIR += netleak SUBDIR += netmagis-common SUBDIR += netmagis-database SUBDIR += netmagis-detecteq SUBDIR += netmagis-metro SUBDIR += netmagis-servers SUBDIR += netmagis-topo SUBDIR += netmagis-utils SUBDIR += netmagis-www SUBDIR += netmask SUBDIR += netspoc SUBDIR += networkmanager-shim SUBDIR += networkmgr SUBDIR += netxms SUBDIR += nfdump SUBDIR += nfs-exporter SUBDIR += nfsen SUBDIR += ng_ipacct SUBDIR += nitpicker SUBDIR += nrpe SUBDIR += nsca SUBDIR += nsca-client SUBDIR += nsca-ng SUBDIR += nsca-ng-client SUBDIR += nsca27 SUBDIR += nsca27-client SUBDIR += nsd_exporter SUBDIR += nstat SUBDIR += nvidia_gpu_prometheus_exporter SUBDIR += observium SUBDIR += ocsinventory-agent SUBDIR += ocsinventory-ocsreports SUBDIR += ocsinventory-server SUBDIR += omada5 SUBDIR += omping SUBDIR += openbmp SUBDIR += openlldp SUBDIR += openvmps SUBDIR += p0f SUBDIR += p5-AnyEvent-SNMP SUBDIR += p5-BigIP-iControl SUBDIR += p5-Cflow SUBDIR += p5-Cisco-CopyConfig SUBDIR += p5-Cisco-Reconfig SUBDIR += p5-Data-Validate-IP SUBDIR += p5-FusionInventory-Agent SUBDIR += p5-MRTG-Parse SUBDIR += p5-Mon SUBDIR += p5-Monitoring-Livestatus SUBDIR += p5-Monitoring-Plugin SUBDIR += p5-NSNMP SUBDIR += p5-Nagios-Object SUBDIR += p5-Nagios-Plugin SUBDIR += p5-Nagios-Plugin-Beanstalk SUBDIR += p5-Nagios-Plugin-LDAP SUBDIR += p5-Nagios-Plugin_check_raid SUBDIR += p5-Nagios-Plugins-Memcached SUBDIR += p5-Net-ACL SUBDIR += p5-Net-Abuse-Utils SUBDIR += p5-Net-Abuse-Utils-Spamhaus SUBDIR += p5-Net-CIDR SUBDIR += p5-Net-ILO SUBDIR += p5-Net-IP SUBDIR += p5-Net-IP-Match-Regexp SUBDIR += p5-Net-IP-Match-XS SUBDIR += p5-Net-IP-Resolver SUBDIR += p5-Net-IP-XS SUBDIR += p5-Net-IPAddress SUBDIR += p5-Net-IPv4Addr SUBDIR += p5-Net-IPv6Addr SUBDIR += p5-Net-NSCA-Client SUBDIR += p5-Net-Netmask SUBDIR += p5-Net-OpenVPN-Manage SUBDIR += p5-Net-SNMP SUBDIR += p5-Net-SNMP-Util SUBDIR += p5-Net-SNMPTrapd SUBDIR += p5-Net-Telnet-Cisco-IOS SUBDIR += p5-NetAddr-IP SUBDIR += p5-NetAddr-IP-Lite SUBDIR += p5-NetApp SUBDIR += p5-OSLV-Monitor SUBDIR += p5-POE-Component-SNMP SUBDIR += p5-Prometheus-Tiny SUBDIR += p5-Prometheus-Tiny-Shared SUBDIR += p5-RDR-Collector SUBDIR += p5-SNMP-Info SUBDIR += p5-SNMP-MIB-Compiler SUBDIR += p5-SNMP-Simple SUBDIR += p5-SNMP-Trapinfo SUBDIR += p5-SNMP-Util SUBDIR += p5-SNMP_Session SUBDIR += p5-Telnet-Cisco SUBDIR += p5-Tie-NetAddr-IP SUBDIR += p5-Xymon SUBDIR += p5-Xymon-Client SUBDIR += p5-Xymon-Server SUBDIR += p5-Zenoss SUBDIR += p5-jmx4perl SUBDIR += packit SUBDIR += pads SUBDIR += pancho SUBDIR += pandorafms_agent SUBDIR += pandorafms_console SUBDIR += pandorafms_server SUBDIR += peering-manager SUBDIR += pftabled SUBDIR += php-fpm_exporter SUBDIR += php81-snmp SUBDIR += php82-snmp SUBDIR += php83-snmp SUBDIR += php84-snmp SUBDIR += php85-snmp SUBDIR += phpfpm_exporter SUBDIR += phpipam SUBDIR += ping_exporter SUBDIR += pktstat SUBDIR += pmacct SUBDIR += pnp SUBDIR += pnp-icinga2 SUBDIR += portmon SUBDIR += prometheus-bird-exporter SUBDIR += prometheus-collectd-exporter SUBDIR += prometheus1 SUBDIR += prometheus2 SUBDIR += prometheus3 SUBDIR += promscale SUBDIR += promxy SUBDIR += pushgateway SUBDIR += py-adal SUBDIR += py-aggregate6 SUBDIR += py-arouteserver SUBDIR += py-ciscoconfparse SUBDIR += py-dnsdiag SUBDIR += py-gstat_exporter SUBDIR += py-ipcalc SUBDIR += py-ipy SUBDIR += py-junos-eznc SUBDIR += py-msrest SUBDIR += py-msrestazure SUBDIR += py-napalm SUBDIR += py-napalm-logs SUBDIR += py-ncclient SUBDIR += py-netutils SUBDIR += py-nxapi-plumbing SUBDIR += py-opn-cli SUBDIR += py-pdagent SUBDIR += py-pdagent-integrations SUBDIR += py-phonebox-plugin SUBDIR += py-prometheus-client SUBDIR += py-pyIOSXR SUBDIR += py-pyang SUBDIR += py-pyeapi SUBDIR += py-pyixapi SUBDIR += py-pynetbox SUBDIR += py-pynxos SUBDIR += py-pypowerwall SUBDIR += py-pysmi SUBDIR += py-pysnmp SUBDIR += py-pysnmp-mibs SUBDIR += py-pyzabbix SUBDIR += py-snmp_passpersist SUBDIR += py-snmpclitools SUBDIR += rackmonkey SUBDIR += rancid3 SUBDIR += rate SUBDIR += rcpd SUBDIR += realmd SUBDIR += remarp SUBDIR += resource-agents SUBDIR += riemann SUBDIR += riemann-c-client SUBDIR += rotorouter SUBDIR += routers2 SUBDIR += routers2-extensions SUBDIR += routers2-extras SUBDIR += rrdbot SUBDIR += rs-aggregate SUBDIR += rtrlib SUBDIR += rubygem-blimpy SUBDIR += rubygem-checkson SUBDIR += rubygem-oxidized SUBDIR += rubygem-oxidized-script SUBDIR += rubygem-oxidized-web SUBDIR += rubygem-riemann-client SUBDIR += rubygem-riemann-dash SUBDIR += rubygem-riemann-rabbitmq SUBDIR += rubygem-riemann-tail SUBDIR += rubygem-riemann-tools SUBDIR += rubygem-snmp SUBDIR += rubygem-visage-app SUBDIR += sblim-wbemcli SUBDIR += sdig SUBDIR += seafile-client SUBDIR += seafile-gui SUBDIR += seafile-server SUBDIR += semaphore SUBDIR += sendip + SUBDIR += simplomon SUBDIR += sipcalc SUBDIR += sjitter SUBDIR += smartctl_exporter SUBDIR += smokeping SUBDIR += snmp4nagios SUBDIR += snmptt SUBDIR += softflowd SUBDIR += spectools SUBDIR += ssgless SUBDIR += statsite SUBDIR += subcalc SUBDIR += super_mediator SUBDIR += sysmon SUBDIR += tcpreplay SUBDIR += tcptrack SUBDIR += telegraf SUBDIR += thanos SUBDIR += torrus SUBDIR += triton-guesttools SUBDIR += unbound_exporter SUBDIR += unifi9 SUBDIR += victoria-logs SUBDIR += victoria-metrics SUBDIR += virt-viewer SUBDIR += vmutils SUBDIR += wdiag SUBDIR += whatmask SUBDIR += wifimgr SUBDIR += wmi-client SUBDIR += xymon-client SUBDIR += xymon-server SUBDIR += yaf SUBDIR += zabbix6-agent SUBDIR += zabbix6-frontend SUBDIR += zabbix6-java SUBDIR += zabbix6-proxy SUBDIR += zabbix6-server SUBDIR += zabbix7-agent SUBDIR += zabbix7-frontend SUBDIR += zabbix7-java SUBDIR += zabbix7-proxy SUBDIR += zabbix7-server SUBDIR += zabbix72-agent SUBDIR += zabbix72-frontend SUBDIR += zabbix72-java SUBDIR += zabbix72-proxy SUBDIR += zabbix72-server SUBDIR += zabbix74-agent SUBDIR += zabbix74-frontend SUBDIR += zabbix74-java SUBDIR += zabbix74-proxy SUBDIR += zabbix74-server .include diff --git a/net-mgmt/simplomon/Makefile b/net-mgmt/simplomon/Makefile new file mode 100644 index 000000000000..63c670ac3c1a --- /dev/null +++ b/net-mgmt/simplomon/Makefile @@ -0,0 +1,60 @@ +PORTNAME= simplomon +DISTVERSION= g20250224 +CATEGORIES= net-mgmt dns net +MAINTAINER= dch@FreeBSD.org +COMMENT= Simple network status and uptime monitoring tool +WWW= https://github.com/berthubert/simplomon + +LICENSE= MIT +LICENSE_FILE= ${WRKSRC}/LICENSE + +BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pip>0:devel/py-pip@${PY_FLAVOR} \ + nlohmann-json>0:devel/nlohmann-json \ + xxd>0:sysutils/xxd + +LIB_DEPENDS= libcurl.so:ftp/curl \ + libfmt.so:devel/libfmt \ + libnghttp2.so:www/libnghttp2 +USES= cmake:indirect compiler:c++17-lang llvm:18,build lua:53,build \ + meson ninja pkgconfig python:build sqlite ssl + +USE_GITHUB= yes +GH_ACCOUNT= berthubert +GH_TAGNAME= b4fea5b # https://github.com/berthubert/simplomon/pull/58 +GH_TUPLE= berthubert:sqlitewrite:a2c2ee:sqlitewrite \ + ahuPowerDNS:simplesocket:3af5e1d:simplesocket \ + yhirose:cpp-httplib:v0.13.1:httplib + +USE_RC_SUBR= simplomon + +MESON_ARGS+= --default-library=static \ + --prefer-static \ + --strip \ + --wrap-mode=nodownload + +SUB_FILES= pkg-message simplomon +SUB_LIST= ETCDIR=${ETCDIR} + +PLIST_FILES= bin/simplomon +PORTDOCS= README.md + +OPTIONS_DEFINE= DOCS + +post-extract: + ${RLN} ${WRKDIR}/sqlitewrite-* ${WRKSRC}/subprojects/sqlitewriter + ${RLN} ${WRKDIR}/simplesocket-* ${WRKSRC}/subprojects/simplesockets + ${RLN} ${WRKDIR}/cpp-httplib-* ${WRKSRC}/subprojects/ + +post-build: + ${RM} -rf ${WRKDIR}/_build/meson-private ${WRKSRC}/subprojects + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/_build/simplomon \ + ${STAGEDIR}${PREFIX}/bin + +post-install-DOCS-on: + ${MKDIR} ${STAGEDIR}${DOCSDIR} + ${INSTALL_DATA} ${WRKSRC}/${PORTDOCS} \ + ${STAGEDIR}${DOCSDIR} + +.include diff --git a/net-mgmt/simplomon/distinfo b/net-mgmt/simplomon/distinfo new file mode 100644 index 000000000000..f13d8452e4fe --- /dev/null +++ b/net-mgmt/simplomon/distinfo @@ -0,0 +1,9 @@ +TIMESTAMP = 1741342561 +SHA256 (berthubert-simplomon-g20250224-b4fea5b_GH0.tar.gz) = 834aa0f83167feb1b9eeb36602bb933cb71884dcf558fea8e69cce73a2556c4f +SIZE (berthubert-simplomon-g20250224-b4fea5b_GH0.tar.gz) = 260634 +SHA256 (berthubert-sqlitewrite-a2c2ee_GH0.tar.gz) = 5a0d40c1e1e28a673fbc9b2f311bc97a629470a8388c0aa297720a7a83d4d8d8 +SIZE (berthubert-sqlitewrite-a2c2ee_GH0.tar.gz) = 78179 +SHA256 (ahuPowerDNS-simplesocket-3af5e1d_GH0.tar.gz) = 5a5ee9856f0ec44ddbb956c6f35408f2f90e37c2fc66269603aae7b190051c76 +SIZE (ahuPowerDNS-simplesocket-3af5e1d_GH0.tar.gz) = 84280 +SHA256 (yhirose-cpp-httplib-v0.13.1_GH0.tar.gz) = 9b837d290b61e3f0c4239da0b23bbf14c382922e2bf2a9bac21c1e3feabe1ff9 +SIZE (yhirose-cpp-httplib-v0.13.1_GH0.tar.gz) = 644015 diff --git a/net-mgmt/simplomon/files/patch-mailmon.cc b/net-mgmt/simplomon/files/patch-mailmon.cc new file mode 100644 index 000000000000..dded82335e7c --- /dev/null +++ b/net-mgmt/simplomon/files/patch-mailmon.cc @@ -0,0 +1,12 @@ +--- mailmon.cc.orig 2025-11-03 17:55:52 UTC ++++ mailmon.cc +@@ -246,7 +246,8 @@ CheckResult SMTPChecker::perform() + msg+=fmt::format("Message-Id: <{}@simplomon.hostname>\r\n", time(nullptr)); + + //Date: Thu, 28 Dec 2023 14:31:37 +0100 (CET) +- msg += fmt::format("Date: {:%a, %d %b %Y %H:%M:%S %z (%Z)}\r\n", fmt::localtime(time(0))); ++ time_t now = time(0); ++ msg += fmt::format("Date: {:%a, %d %b %Y %H:%M:%S %z (%Z)}\r\n", *std::localtime(&now)); + msg+="\r\n"; + + msg+=to_string(time(nullptr))+"\r\n"; diff --git a/net-mgmt/simplomon/files/patch-meson.build b/net-mgmt/simplomon/files/patch-meson.build new file mode 100644 index 000000000000..7ee99bcf1842 --- /dev/null +++ b/net-mgmt/simplomon/files/patch-meson.build @@ -0,0 +1,22 @@ +--- meson.build.orig 2025-02-19 22:01:58 UTC ++++ meson.build +@@ -66,7 +66,6 @@ sqlitewriter_dep = dependency('sqlitewriter', static: + + cpphttplib = dependency('cpp-httplib') + sqlitewriter_dep = dependency('sqlitewriter', static: true) +-doctest_dep=dependency('doctest') + simplesockets_dep = dependency('simplesockets', static: true) + # argparse_dep = dependency('argparse', version: '>=3') + +@@ -104,11 +103,3 @@ webpages, + webpages, + dependencies: [json_dep, fmt_dep, cpphttplib, + simplesockets_dep, lua_dep, curl_dep, sqlite_dep, sqlitewriter_dep]) +- +-executable('testrunner', 'testrunner.cc', 'notifiers.cc', 'minicurl.cc', 'dnsmon.cc', 'record-types.cc', 'dnsmessages.cc', 'dns-storage.cc', 'netmon.cc', 'luabridge.cc', 'webservice.cc', 'support.cc', 'promon.cc', 'mailmon.cc', 'nonblocker.cc', +- dependencies: [doctest_dep, curl_dep, json_dep, fmt_dep, cpphttplib, sqlite_dep, +- simplesockets_dep, lua_dep, sqlitewriter_dep]) +- +- +- +- diff --git a/net-mgmt/simplomon/files/patch-notifiers.cc b/net-mgmt/simplomon/files/patch-notifiers.cc new file mode 100644 index 000000000000..d3d6159fabd7 --- /dev/null +++ b/net-mgmt/simplomon/files/patch-notifiers.cc @@ -0,0 +1,17 @@ +--- notifiers.cc.orig 2025-11-01 23:43:58 UTC ++++ notifiers.cc +@@ -117,7 +117,8 @@ static void sendAsciiEmailAsync(const std::string& ser + sc.writen(fmt::format("Message-Id: <{}@simplomon.hostname>\r\n", getRandom64())); + + //Date: Thu, 28 Dec 2023 14:31:37 +0100 (CET) +- sc.writen(fmt::format("Date: {:%a, %d %b %Y %H:%M:%S %z (%Z)}\r\n", fmt::localtime(time(0)))); ++ time_t now = time(0); ++ sc.writen(fmt::format("Date: {:%a, %d %b %Y %H:%M:%S %z (%Z)}\r\n", *std::localtime(&now))); + sc.writen("\r\n"); + + string withCrlf; +@@ -267,4 +268,3 @@ void TelegramNotifier::alert(const std::string& messag + + // fmt::print("{}\n", res->body); + } +- diff --git a/net-mgmt/simplomon/files/pkg-message.in b/net-mgmt/simplomon/files/pkg-message.in new file mode 100644 index 000000000000..ba32dd61bf5e --- /dev/null +++ b/net-mgmt/simplomon/files/pkg-message.in @@ -0,0 +1,16 @@ +[ +{ type: install + message: <