Initial import

This commit is contained in:
Alex Kirhenshtein 2016-09-27 16:43:45 +03:00
commit 1871128bcb
27 changed files with 1052 additions and 0 deletions

217
changelog Normal file
View file

@ -0,0 +1,217 @@
netxms (2.0.6-1) unstable; urgency=medium
* Fixed incorrect interface network mask reported by agent on Windows XP and Windows Server 2003
* Added option to turn off quotes in AT+CMGS command in generic SMS driver
* Improved compatibility with different GSM modem types in generic SMS driver
* Fixed SQL errors when saving LDAP users to database
* Fixed excessive temporary files creation by web UI
* Fixed build errors on Solaris 11
* Fixed memory leak in Oracle DB driver
* Fixed bug in SNMP transport causing false timeout errors
* New agent metrics for self-monitoring: Agent.Proxy.ActiveSessions, Agent.Proxy.ConnectionRequests, Agent.Proxy.IsEnabled, Agent.SNMP.IsProxyEnabled, Agent.SNMP.IsTrapProxyEnabled, Agent.SNMP.Requests, Agent.SNMP.Responses, Agent.SNMP.ServerRequests
* Fixed issues: #753, #826, #851, #987, #1273, #1277, #1278, #1280
-- Alex Kirhenshtein <alk@radensolutions.com> Fri, 09 Sep 2016 10:30:33 +0300
netxms (2.0.5-1) unstable; urgency=medium
* Data collection script can return null to indicate data collection error
* Added option to set type of each varbind in nxsnmpset
* Fixed memory leak in PostgreSQL database driver
* New attributes "source" and "sourceId" in NXSL class "Event"
* New method toJson() in NXSL class "Event
* LVM monitoring parameters on AIX
* Added option to get normalized server thread pool load average
* Fixed bug in self-monitoring termplates
* Fixed issues: #1018, #1039, #1239, #1250, #1255
-- Alex Kirhenshtein <alk@radensolutions.com> Tue, 26 Jul 2016 12:18:37 +0300
netxms (2.0.4-1) unstable; urgency=medium
* New parameters in Linux platform subagent to get additional CPU information (frequency, model, etc.)
* Fixed bugs in LLDP based network topology discovery
* Correct notifications on threshold script errors
* Option to use last known value for cluster data aggregation in case of data collecion failure
* Added server configuration parameter to ignore syslog message timestamps and always use server time
* Added option to disconnect existing sessions of same user on login
* NXSL: implemented compound assignment operators and prefix increment/decrement for array elements
* NXSL: can access event parameters as event object attributes (like $event->$1 or $event->instance)
* Fixed issues: #405, #775, #859, #984, #1086, #1112, #1186, #1194, #1195, #1196, #1197, #1200, #1209, #1210, #1214, #1223, #1227, #1231
-- Alex Kirhenshtein <alk@debian8-64.radensolutions.com> Mon, 06 Jun 2016 17:47:40 +0300
netxms (2.0.3-1) unstable; urgency=medium
* Additional parameters in Oracle subagent for redo logs and ASM monitoring
* NXSL: variable $errormsg holding error description set in catch block
* New NXSL function SplitString
* NXSL: new methods setExpectedState and setExcludeFromTopology in Interface class
* Default interface expected state can be configured
* GPS subagent (provides location data from NMEA compatible GPS receivers)
* Server can update node location using GPS subagent
* Fixed error while event alarm linking multiple times
* Fixed server hang on shutdown
* NetXMS processes uses LC_CTYPE from environment for terminal I/O
* Fixed bug in saving service checks
* Fixed server crash caused by heap corruption in MS SQL and DB/2 database drivers
* Fixed server deadlock caused by simultaneous use of instance discovery and transformation scripts
* Agent parameters for monitoring System V message queues
* New action User.ChangePassword in WINNT subagent
* Text2reach SMS driver improved
* Port check subagent can be configured to return negative value as response time in case of error
* Fixed issues: #950, #962, #988, #1048, #1102, #1124, #1131, #1135, #1147, #1149, #1154, #1163, #1166, #1170, #1174
-- Alex Kirhenshtein <alk@netxms.org> Thu, 31 Mar 2016 20:27:57 +0300
netxms (2.0.2-1) unstable; urgency=medium
* Optimized LDAP synchronization for large directories
* Added NXSL API for manipulating object geolocation
* Fixed bug that allows to crash server remotely by sending garbage to client connector port
* NXSL: new hash map attributes "keys" and "values"
* Object custom attributes can be accessed as hash map in NXSL
* New server debug console commands "log" and "logmark"
* Fixed issues: #1042, #1049, #1093, #1111, #1117, #1125, #1128, #1133, #1134, #1139
-- Alex Kirhenshtein <alk@debian8-64.radensolutions.com> Sat, 06 Feb 2016 20:41:46 +0200
netxms (2.0.1-1) unstable; urgency=medium
* Version updated to fix incorrect RC version names
* Fixed random server crash in ODBC database driver
* Fixed incorrect reading of long text fields by MS SQL database driver
* Fixed issues: #1063
-- Alex Kirhenshtein <alk@debian8-64.radensolutions.com> Mon, 04 Jan 2016 17:50:54 +0200
netxms (2.0-1) unstable; urgency=medium
* Template import correctly handles updates for existing templates
* Scripts can be used as instance source in instance discovery DCIs
* NXSL node object attribute snmpSysDescription renamed back to sysDescription
* Selectors in NXSL
* Array attributes in NXSL: size, minIndex, maxIndex
* Hash map attributes in NXSL: size
* New NXSL function: mapList
* Subnet mask for synthetic subnets can be set in server configuration
* Added cumulative counters for server DB writer requests
* Fixed data corruption issues in ODBC and Oracle DB drivers
* Additional internal server metrics for monitoring DB activity and performance
* Added interface creation hook
* Improved System.InstalledProducts table handling on Windows
* Fixed inefficient query in Oracle monitoring subagent
* Server shutdown speed improved
* Faster SNMP probing during configuration polls
* Fixed false negative in node down detection if expected state of some interfaces set to IGNORE
* Agent SNMP proxy improved
* Improved agent data cache reconciliation
* Fixed Oracle 12c compatibility issues
* Automatic configuration import from templates directory on server startup
* Fixed address list configuration bug
* Fixed issues: #205, #847, #849, #948, #963, #964, #966, #967, #971, #974, #978, #979, #980, #983, #991, #997, #1002, #1003, #1004, #1013, #1019, #1024, #1029, #1032, #1058, #1071, #1072, #1074, #1081, #1082, #1083, #1084, #1085
-- Alex Kirhenshtein <alk@netxms.org> Wed, 30 Dec 2015 14:13:33 +0200
netxms (2.0-RC2-3) unstable; urgency=medium
* XMPP sender moved to separate thread
* Issue #967 fixed (agent cache mode ignored for DCIs with source node set)
* New list Net.InterfaceNames (issue #964)
-- Alex Kirhenshtein <alk@netxms.org> Wed, 28 Oct 2015 15:10:26 +0200
netxms (2.0-RC2-2) unstable; urgency=medium
* Fix for cached data collection for DCIs with default collection interval
-- Alex Kirhenshtein <alk@netxms.org> Mon, 19 Oct 2015 17:12:06 +0300
netxms (2.0-RC2-1) unstable; urgency=low
* Maintenance mode for nodes, clusters, and mobile devices (manual and scheduled)
* Fixed broken instance discovery filters
* Fixed agent crash when collecting SNMP data in cached mode
* Agent returns correct OS version on Windows 10
* New NXSL "Node" class attribute: bridgeBaseAddress
* One LDAP attribute can be used in multiple mappings
* Fied deadlock on LDAP user deletion while LDAP synchronization
* Add option to use encrypted password in password fileds in configuration files and in the server configuration parameters.
* Added SMS driver for web service text2reach.com
* SNMP sysContact and sysLocation collected and stored
* Server can accept traps and syslog messages from nodes in all zones (controlled by TrapSourcesInAllZones configuration option)
* On instance discovery pool instance name is updated if it has changed
* New SMS driver - slack.com
* IPv6 support in built-in syslog server
* Fixed event processing policy export/import issues
* Global default retention time and polling interval for data collection
* Initial support for scheduled tasks within system
* Scheduled file upload
* Management console:
* Object context menu available on geo map
* Filter in event template configurator
* Web console use contextlient time zone to display time
* Added option to use server time zone to display time in console
* Access to event log, SNMP trap log, and syslog from object context menu
* Dashboards can be associated with other objects (nodes, containers, etc.) and opened from object's context menu
* Forced DCI polls from summary tables
* Script hints
* Fixed issues: #786, #831,786 #841, #852, #864, #878, #883, #890, #891, #892, #896, #897, #898, #900, #902, #903, #905, #907, #910, #913, #917, #919, #921, #928, #933, #937, #943, #945, #947
-- Alex Kirhenshtein <alk@netxms.org> Mon, 19 Oct 2015 03:33:44 +0300
netxms (2.0-RC1-1) unstable; urgency=low
* Fixed LDAP authentication issues with Active Directory
* Fixed character encoding issues in LDAP user data
* Java subagent improved
* Fixed multiple issues with agent side data caching
* Hash maps implemented in NXSL
* Improved array implementation in NXSL
* New NXSL function ArrayToString
* New OS parameters and tables: System.HandleCount, System.OpenFiles, Process.Handles
* Unified macros in all types of object tools
* Server can be switched to case-insensitive login names mode
* Implemented support of "command generates output" option for server commands
* Network device driver for TelcoBridges gateways
-- Alex Kirhenshtein <alk@netxms.org> Fri, 7 Aug 2015 10:38:00 +0300
netxms (2.0-M5-1) unstable; urgency=low
* Fixed bug in handling floating point Windows performance counters
* Added "comments" attribute to NXSL "DCI" class
* New NXSL function sha256
* Fixed broken nxagent.sms SMS driver
* Added support for SNMP traps over IPv6
* Switched to SHA-256 for password hashing
* Timestamp can be provided in nxpush and nxapush
* New methods in NXSL class "Event": setMessage, setSeverity, setUserTag
* Command line options for nxagentd to change effective user and group after start
* Fixed occasional NXSL compiler crash on scripts with syntax errors
* Errors in auto bind/apply scripts interpreted as "ignore" instead of "false" result
* New core agent parameter File.FolderCount
* Fixed broken active discovery
* Improved system behaviour on large installations
* Fixed issues: #50, #630, #780, #781, #791, #794, #797, #798, #806, #815, #816, #817, #824, #832, #833, #837
-- Alex Kirhenshtein <alk@netxms.org> Sat, 20 Jun 2015 13:50:29 +0300
netxms (2.0-M4-1) unstable; urgency=low
* MEGATEC protocol support in UPS subagent
* Template hierarchy preserved during export/import
* Script export/import
* Fixed broken WoL functionality
* Fixed broken PING subagent
* Fixed database upgrade issues on MS SQL
* IPv6 support in PING subagent
* Fixed issues: #655, #657, #804
-- Alex Kirhenshtein <alk@netxms.org> Wed, 29 Apr 2015 16:12:46 +0300
netxms (2.0-M3-1) unstable; urgency=low
* Initial release
-- Alex Kirhenshtein <alk@netxms.org> Mon, 15 Apr 2015 02:43:51 +0300

1
compat Normal file
View file

@ -0,0 +1 @@
9

191
control Normal file
View file

@ -0,0 +1,191 @@
Source: netxms
Priority: extra
Maintainer: Alex Kirhenshtein <alk@netxms.org>
Build-Depends:
debhelper (>= 9),
dh-autoreconf,
debconf,
lsb-release,
libssl-dev,
zlib1g-dev,
libexpat1-dev,
libsensors4-dev,
libjansson-dev,
libreadline-dev,
libsqlite3-dev,
libmysqlclient-dev,
libcurl4-openssl-dev,
libpq-dev,
libldap2-dev,
libaio1,
unixodbc-dev,
default-jdk,
libzmq3-dev | debhelper
Standards-Version: 4.9.3
Section: admin
Homepage: http://www.netxms.org/
Package: netxms-base
Architecture: any
Multi-Arch: same
Pre-Depends: ${misc:Pre-Depends}
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: NetXMS core libraries
<insert long description, indented with spaces>
Package: netxms-base-dbg
Architecture: any
Section: debug
Priority: extra
Depends:
netxms-base (= ${binary:Version})
Description: debugging symbols for netxms-base
This package contains the debugging symbols for netxms-base
Package: netxms-agent
Architecture: any
Multi-Arch: same
Depends: netxms-base (= ${binary:Version}), netxms-dbdrv-sqlite3 (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends}
Description: NetXMS agent
<insert long description, indented with spaces>
Package: netxms-agent-dbg
Architecture: any
Section: debug
Priority: extra
Depends:
netxms-agent (= ${binary:Version}), netxms-base-dbg (= ${binary:Version})
Description: debugging symbols for netxms-agent
This package contains the debugging symbols for netxms-agent
Package: netxms-agent-java
Architecture: any
Multi-Arch: same
Depends: netxms-agent (= ${binary:Version}), default-jdk, ${shlibs:Depends}, ${misc:Depends}
Description: Java subagent for NetXMS agent
<insert long description, indented with spaces>
Package: netxms-client
Architecture: any
Multi-Arch: same
Depends: netxms-base (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends}
Description: NetXMS command line client tools
<insert long description, indented with spaces>
Package: netxms-client-dbg
Architecture: any
Section: debug
Priority: extra
Depends:
netxms-base (= ${binary:Version}), netxms-base-dbg (= ${binary:Version})
Description: debugging symbols for netxms-client
This package contains the debugging symbols for netxms-client
Package: netxms-server
Architecture: any
Multi-Arch: same
Depends:
netxms-base (= ${binary:Version}),
netxms-dbdrv-sqlite3 (= ${binary:Version}) |
netxms-dbdrv-pgsql (= ${binary:Version}) |
netxms-dbdrv-mysql (= ${binary:Version}),
${shlibs:Depends}, ${misc:Depends}
Suggests: netxms-dbdrv-pgsql, netxms-dbdrv-mysql, netxms-dbdrv-oracle
Description: meta package
<insert long description, indented with spaces>
Package: netxms-server-dbg
Architecture: any
Section: debug
Priority: extra
Depends:
netxms-server (= ${binary:Version}), netxms-base-dbg (= ${binary:Version})
Description: debugging symbols for netxms-server
This package contains the debugging symbols for netxms-server
Package: netxms-dbdrv-sqlite3
Architecture: any
Multi-Arch: same
Pre-Depends: ${misc:Pre-Depends}
Depends: netxms-base (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends}
Description: SQLite3 driver for netxms-server
<insert long description, indented with spaces>
Package: netxms-dbdrv-sqlite3-dbg
Architecture: any
Section: debug
Priority: extra
Depends:
netxms-dbdrv-sqlite3 (= ${binary:Version}), netxms-base-dbg (= ${binary:Version})
Description: debugging symbols for netxms-dbdrv-sqlite3
This package contains the debugging symbols for netxms-dbdrv-sqlite3
Package: netxms-dbdrv-pgsql
Architecture: any
Multi-Arch: same
Pre-Depends: ${misc:Pre-Depends}
Depends: netxms-base (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends}
Suggests: postgresql-9.4
Description: PostgreSQL driver for netxms-server
<insert long description, indented with spaces>
Package: netxms-dbdrv-pgsql-dbg
Architecture: any
Section: debug
Priority: extra
Depends:
netxms-dbdrv-pgsql (= ${binary:Version}), netxms-base-dbg (= ${binary:Version})
Description: debugging symbols for netxms-dbdrv-pgsql
This package contains the debugging symbols for netxms-dbdrv-pgsql
Package: netxms-dbdrv-mysql
Architecture: any
Multi-Arch: same
Pre-Depends: ${misc:Pre-Depends}
Depends: netxms-base (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends}
Suggests: mysql-server
Description: MySQL driver for netxms-server
<insert long description, indented with spaces>
Package: netxms-dbdrv-mysql-dbg
Architecture: any
Section: debug
Priority: extra
Depends:
netxms-dbdrv-mysql (= ${binary:Version}), netxms-base-dbg (= ${binary:Version})
Description: debugging symbols for netxms-dbdrv-mysql
This package contains the debugging symbols for netxms-dbdrv-mysql
Package: netxms-dbdrv-odbc
Architecture: any
Multi-Arch: same
Pre-Depends: ${misc:Pre-Depends}
Depends: netxms-base (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends}
Description: unixODBC driver for netxms-server
<insert long description, indented with spaces>
Package: netxms-dbdrv-odbc-dbg
Architecture: any
Section: debug
Priority: extra
Depends:
netxms-dbdrv-odbc (= ${binary:Version}), netxms-base-dbg (= ${binary:Version})
Description: debugging symbols for netxms-dbdrv-odbc
This package contains the debugging symbols for netxms-dbdrv-odbc
Package: netxms-dbdrv-oracle
Architecture: any
Multi-Arch: same
Pre-Depends: ${misc:Pre-Depends}
Depends: netxms-base (= ${binary:Version}), libaio1, ${shlibs:Depends}, ${misc:Depends}
Description: Oracle driver for netxms-server
<insert long description, indented with spaces>
Package: netxms-dbdrv-oracle-dbg
Architecture: any
Section: debug
Priority: extra
Depends:
netxms-dbdrv-oracle (= ${binary:Version}), netxms-base-dbg (= ${binary:Version})
Description: debugging symbols for netxms-dbdrv-oracle
This package contains the debugging symbols for netxms-dbdrv-oracle

22
copyright Normal file
View file

@ -0,0 +1,22 @@
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: netxms
Source: http://www.netxms.org/
Files: *
Copyright: 2015 Alex Kirhenshtein <alk@netxms.org>
License: GPL-2+
This package 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 2 of the License, or
(at your option) any later version.
.
This package 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, see <http://www.gnu.org/licenses/>
.
On Debian systems, the complete text of the GNU General
Public License version 2 can be found in "/usr/share/common-licenses/GPL-2".

2
docs Normal file
View file

@ -0,0 +1,2 @@
NEWS
README

View file

@ -0,0 +1,2 @@
usr/lib/*/netxms/java.nsm
usr/lib/*/netxms/*.jar

20
netxms-agent.install Normal file
View file

@ -0,0 +1,20 @@
usr/bin/nxagentd
usr/bin/nxappget
usr/bin/nxapush
usr/lib/*/libappagent.so.*
usr/lib/*/libnxagent.so.*
usr/lib/*/libnxlp.so.*
usr/lib/*/netxms/dbquery.nsm
usr/lib/*/netxms/devemu.nsm
usr/lib/*/netxms/ds18x20.nsm
usr/lib/*/netxms/ecs.nsm
usr/lib/*/netxms/filemgr.nsm
usr/lib/*/netxms/linux.nsm
usr/lib/*/netxms/lmsensors.nsm
usr/lib/*/netxms/logwatch.nsm
usr/lib/*/netxms/netsvc.nsm
usr/lib/*/netxms/oracle.nsm
usr/lib/*/netxms/ping.nsm
usr/lib/*/netxms/portcheck.nsm
usr/lib/*/netxms/sms.nsm
usr/lib/*/netxms/ups.nsm

150
netxms-agent.nxagentd.init Normal file
View file

@ -0,0 +1,150 @@
#!/bin/sh
### BEGIN INIT INFO
# Provides: nxagentd
# Required-Start: $network $local_fs
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: NetXMS agent
# Description: NetXMS native agent which provide system information to NetXMS server
### END INIT INFO
# Author: Alex Kirhenshtein <alk@netxms.org>
PATH=/sbin:/usr/sbin:/bin:/usr/bin
DESC="NetXMS agent"
NAME=nxagentd
DAEMON=/usr/bin/nxagentd
DAEMON_ARGS="-d"
PIDFILE=/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME
# Exit if the package is not installed
[ -x $DAEMON ] || exit 0
# Read configuration variable file if it is present
[ -r /etc/default/$NAME ] && . /etc/default/$NAME
# Load the VERBOSE setting and other rcS variables
. /lib/init/vars.sh
# Define LSB log_* functions.
# Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
. /lib/lsb/init-functions
#
# Function that starts the daemon/service
#
do_start()
{
# Return
# 0 if daemon has been started
# 1 if daemon was already running
# 2 if daemon could not be started
start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \
|| return 1
start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \
$DAEMON_ARGS \
|| return 2
# Add code here, if necessary, that waits for the process to be ready
# to handle requests from services started subsequently which depend
# on this one. As a last resort, sleep for some time.
}
#
# Function that stops the daemon/service
#
do_stop()
{
# Return
# 0 if daemon has been stopped
# 1 if daemon was already stopped
# 2 if daemon could not be stopped
# other if a failure occurred
start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $NAME
RETVAL="$?"
[ "$RETVAL" = 2 ] && return 2
# Wait for children to finish too if this is a daemon that forks
# and if the daemon is only ever run from this initscript.
# If the above conditions are not satisfied then add some other code
# that waits for the process to drop all resources that could be
# needed by services started subsequently. A last resort is to
# sleep for some time.
start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON
[ "$?" = 2 ] && return 2
# Many daemons don't delete their pidfiles when they exit.
rm -f $PIDFILE
return "$RETVAL"
}
#
# Function that sends a SIGHUP to the daemon/service
#
do_reload() {
#
# If the daemon can reload its configuration without
# restarting (for example, when it is sent a SIGHUP),
# then implement that here.
#
start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE --name $NAME
return 0
}
case "$1" in
start)
[ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC " "$NAME"
do_start
case "$?" in
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
esac
;;
stop)
[ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
do_stop
case "$?" in
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
esac
;;
status)
status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
;;
#reload|force-reload)
#
# If do_reload() is not implemented then leave this commented out
# and leave 'force-reload' as an alias for 'restart'.
#
#log_daemon_msg "Reloading $DESC" "$NAME"
#do_reload
#log_end_msg $?
#;;
restart|force-reload)
#
# If the "reload" option is implemented then remove the
# 'force-reload' alias
#
log_daemon_msg "Restarting $DESC" "$NAME"
do_stop
case "$?" in
0|1)
do_start
case "$?" in
0) log_end_msg 0 ;;
1) log_end_msg 1 ;; # Old process is still running
*) log_end_msg 1 ;; # Failed to start
esac
;;
*)
# Failed to stop
log_end_msg 1
;;
esac
;;
*)
echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2
exit 3
;;
esac
:

39
netxms-agent.postinst Normal file
View file

@ -0,0 +1,39 @@
#!/bin/sh
set -e
CONFIG="/etc/nxagentd.conf"
case "$1" in
configure)
if [ ! -f $CONFIG ]; then
TARGET=$CONFIG
else
TARGET=${CONFIG}.dist
fi
cat > $TARGET <<__END
# Log File
LogFile=/var/log/nxagentd
# IP white list, can contain multiple records separated by comma.
# CIDR notation supported for subnets.
MasterServers=127.0.0.0/8
__END
;;
abort-upgrade|abort-remove|abort-deconfigure)
;;
*)
echo "postinst called with unknown argument \`$1'" >&2
exit 1
;;
esac
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.
#DEBHELPER#
exit 0

24
netxms-agent.postrm Normal file
View file

@ -0,0 +1,24 @@
#!/bin/sh
set -e
case "$1" in
purge)
rm -rf /etc/nxagentd.conf /etc/nxagentd.conf.dist /etc/nxagentd.conf.d
;;
remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
;;
*)
echo "postrm called with unknown argument \`$1'" >&2
exit 1
;;
esac
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.
#DEBHELPER#
exit 0

1
netxms-base.dirs Normal file
View file

@ -0,0 +1 @@
var/lib/netxms

6
netxms-base.install Normal file
View file

@ -0,0 +1,6 @@
usr/bin/nxencpasswd
usr/lib/*/libnetxms.so.*
usr/lib/*/libnxclient.so.*
usr/lib/*/libnxdb.so.*
usr/lib/*/libnxsnmp.so.*
usr/lib/*/libnxtre.so.*

24
netxms-base.postrm Normal file
View file

@ -0,0 +1,24 @@
#!/bin/sh
set -e
case "$1" in
purge)
rm -f /var/lib/netxms/registry.dat
;;
remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
;;
*)
echo "postrm called with unknown argument \`$1'" >&2
exit 1
;;
esac
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.
#DEBHELPER#
exit 0

4
netxms-client.install Normal file
View file

@ -0,0 +1,4 @@
usr/bin/nxpush
usr/bin/nxevent
usr/bin/nxalarm
usr/bin/nxsms

View file

@ -0,0 +1 @@
usr/lib/*/netxms/dbdrv/mysql.ddr

View file

@ -0,0 +1 @@
usr/lib/*/netxms/dbdrv/odbc.ddr

View file

@ -0,0 +1 @@
usr/lib/*/netxms/dbdrv/oracle.ddr

View file

@ -0,0 +1 @@
usr/lib/*/netxms/dbdrv/pgsql.ddr

View file

@ -0,0 +1 @@
usr/lib/*/netxms/dbdrv/sqlite.ddr

24
netxms-server.install Normal file
View file

@ -0,0 +1,24 @@
usr/bin/netxmsd
usr/bin/nxaction
usr/bin/nxadm
usr/bin/nxap
usr/bin/nxdbmgr
usr/bin/nxget
usr/bin/nxmibc
usr/bin/nxscript
usr/bin/nxsnmp*
usr/bin/nxupload
usr/lib/*/netxms/jira.hdlink
usr/lib/*/libavaya-ers.so
usr/lib/*/libcisco.so
usr/lib/*/libnxcore.so*
usr/lib/*/libnxmap.so*
usr/lib/*/libnxsd.so*
usr/lib/*/libnxsl.so*
usr/lib/*/libnxsms_*.so*
usr/lib/*/libnxsrv.so*
usr/lib/*/libstrophe.so*
usr/lib/*/netxms/ndd/*
usr/lib/*/netxms/smsdrv/*
usr/share/netxms/*
var/lib/netxms/*

152
netxms-server.netxmsd.init Normal file
View file

@ -0,0 +1,152 @@
#!/bin/sh
# vim: syntax=sh
### BEGIN INIT INFO
# Provides: netxms-server
# Required-Start: $network $local_fs nxagentd
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: NetXMS server
# Description: Network monitoring daemon, which collect and process metrics
# from native and SNMP agents.
### END INIT INFO
# Author: Alex Kirhenshtein <alk@netxms.org>
PATH=/sbin:/usr/sbin:/bin:/usr/bin
DESC="NetXMS server"
NAME=netxmsd
DAEMON=/usr/bin/netxmsd
DAEMON_ARGS="-d"
PIDFILE=/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME
# Exit if the package is not installed
[ -x $DAEMON ] || exit 0
# Read configuration variable file if it is present
[ -r /etc/default/$NAME ] && . /etc/default/$NAME
# Load the VERBOSE setting and other rcS variables
. /lib/init/vars.sh
# Define LSB log_* functions.
# Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
. /lib/lsb/init-functions
#
# Function that starts the daemon/service
#
do_start()
{
# Return
# 0 if daemon has been started
# 1 if daemon was already running
# 2 if daemon could not be started
start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \
|| return 1
start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \
$DAEMON_ARGS \
|| return 2
# Add code here, if necessary, that waits for the process to be ready
# to handle requests from services started subsequently which depend
# on this one. As a last resort, sleep for some time.
}
#
# Function that stops the daemon/service
#
do_stop()
{
# Return
# 0 if daemon has been stopped
# 1 if daemon was already stopped
# 2 if daemon could not be stopped
# other if a failure occurred
start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $NAME
RETVAL="$?"
[ "$RETVAL" = 2 ] && return 2
# Wait for children to finish too if this is a daemon that forks
# and if the daemon is only ever run from this initscript.
# If the above conditions are not satisfied then add some other code
# that waits for the process to drop all resources that could be
# needed by services started subsequently. A last resort is to
# sleep for some time.
start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON
[ "$?" = 2 ] && return 2
# Many daemons don't delete their pidfiles when they exit.
rm -f $PIDFILE
return "$RETVAL"
}
#
# Function that sends a SIGHUP to the daemon/service
#
do_reload() {
#
# If the daemon can reload its configuration without
# restarting (for example, when it is sent a SIGHUP),
# then implement that here.
#
start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE --name $NAME
return 0
}
case "$1" in
start)
[ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC " "$NAME"
do_start
case "$?" in
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
esac
;;
stop)
[ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
do_stop
case "$?" in
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
esac
;;
status)
status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
;;
#reload|force-reload)
#
# If do_reload() is not implemented then leave this commented out
# and leave 'force-reload' as an alias for 'restart'.
#
#log_daemon_msg "Reloading $DESC" "$NAME"
#do_reload
#log_end_msg $?
#;;
restart|force-reload)
#
# If the "reload" option is implemented then remove the
# 'force-reload' alias
#
log_daemon_msg "Restarting $DESC" "$NAME"
do_stop
case "$?" in
0|1)
do_start
case "$?" in
0) log_end_msg 0 ;;
1) log_end_msg 1 ;; # Old process is still running
*) log_end_msg 1 ;; # Failed to start
esac
;;
*)
# Failed to stop
log_end_msg 1
;;
esac
;;
*)
echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2
exit 3
;;
esac
:

109
netxms-server.postinst Normal file
View file

@ -0,0 +1,109 @@
#!/bin/sh
set -e
CONFIG="/etc/netxmsd.conf"
case "$1" in
configure)
if [ ! -f $CONFIG ]; then
TARGET=$CONFIG
cat <<__END
NetXMS server is installed but currently stopped.
Additional steps required:
1. Edit default configuration file ($CONFIG)
2. Load database schema (replace DBTYPE with proper name):
nxdbmgr init /usr/share/netxms/sql/dbinit_DBTYPE.sql
Example:
SQLite:
nxdbmgr init /usr/share/netxms/sql/dbinit_sqlite.sql
PostgreSQL:
nxdbmgr init /usr/share/netxms/sql/dbinit_pgsql.sql
MySQL:
nxdbmgr init /usr/share/netxms/sql/dbinit_mysql.sql
Oracle:
nxdbmgr init /usr/share/netxms/sql/dbinit_oracle.sql
then start daemon with command:
service netxmsd start
__END
else
TARGET=${CONFIG}.dist
fi
cat > $TARGET <<__END
## Logging
# Log file name
LogFile=/var/log/netxmsd
# Increase logging verbosity, 0 (only errors) to 9 (verbose debug)
#DebugLevel=3
## Database configuration.
## Uncomment and setup ONE section.
## Option #1 - SQLite (for test installations only):
#DBDriver=sqlite.ddr
#DBName=/var/lib/netxms/netxms.db
## Option #2 - PostgreSQL (recommended):
#DBDriver=pgsql.ddr
#DBServer=127.0.0.1
#DBName=netxms
#DBLogin=netxms
#DBPassword=netxms
## Option #3 - MySQL:
#DBDriver=mysql.ddr
#DBServer=127.0.0.1
#DBName=netxms
#DBLogin=netxms
#DBPassword=netxms
## Option #4 - Oracle:
#DBDriver=oracle.ddr
#DBServer=//127.0.0.1:1521/ORCL # Instant Client connection string or SID
#DBLogin=netxms
#DBPassword=netxms
## Option #5 - unixODBC/FreeTDS:
#DBDriver=odbc.ddr
#DBServer=NETXMS_DSN
#DBLogin=netxms
#DBPassword=netxms
__END
if [ ! -z $2 ]; then
# previous version is set, it's upgrade
/usr/bin/nxdbmgr upgrade
fi
# compile MIBs
/usr/bin/nxmibc -o /var/lib/netxms/netxms.mib -d /usr/share/netxms/mibs -z >/dev/null || true
;;
abort-upgrade|abort-remove|abort-deconfigure)
;;
*)
echo "postinst called with unknown argument \`$1'" >&2
exit 1
;;
esac
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.
#DEBHELPER#
exit 0

24
netxms-server.postrm Normal file
View file

@ -0,0 +1,24 @@
#!/bin/sh
set -e
case "$1" in
purge)
rm -f /etc/netxmsd.conf /etc/netxmsd.conf.dist
;;
remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
;;
*)
echo "postrm called with unknown argument \`$1'" >&2
exit 1
;;
esac
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.
#DEBHELPER#
exit 0

0
patches/series Normal file
View file

33
rules Executable file
View file

@ -0,0 +1,33 @@
#!/usr/bin/make -f
#export DH_VERBOSE=1
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
.PHONY: override_dh_installinit override_dh_shlibdeps override_dh_auto_configure override_dh_strip
override_dh_installinit:
dh_installinit -pnetxms-agent --name=nxagentd
dh_installinit -pnetxms-server --name=netxmsd
override_dh_shlibdeps:
dh_shlibdeps --dpkg-shlibdeps-params=--ignore-missing-info
override_dh_auto_configure:
dh_auto_configure -- --with-server --with-agent --with-client \
--with-sqlite --with-mysql --with-pgsql --with-odbc --with-oracle=/opt/instantclient_11_2 \
--enable-unicode --with-jdk=/usr/lib/jvm/default-java --with-zeromq
override_dh_strip:
dh_strip -pnetxms-base --dbg-package=netxms-base-dbg
dh_strip -pnetxms-agent --dbg-package=netxms-agent-dbg
dh_strip -pnetxms-client --dbg-package=netxms-client-dbg
dh_strip -pnetxms-server --dbg-package=netxms-server-dbg
dh_strip -pnetxms-dbdrv-sqlite3 --dbg-package=netxms-dbdrv-sqlite3-dbg
dh_strip -pnetxms-dbdrv-pgsql --dbg-package=netxms-dbdrv-pgsql-dbg
dh_strip -pnetxms-dbdrv-mysql --dbg-package=netxms-dbdrv-mysql-dbg
dh_strip -pnetxms-dbdrv-oracle --dbg-package=netxms-dbdrv-oracle-dbg
dh_strip -pnetxms-dbdrv-odbc --dbg-package=netxms-dbdrv-odbc-dbg
%:
LD_LIBRARY_PATH=$(LD_LIBRARY_PATH):/opt/instantclient_11_2 dh $@ --parallel --with autoreconf

1
source/format Normal file
View file

@ -0,0 +1 @@
3.0 (quilt)

1
source/options Normal file
View file

@ -0,0 +1 @@
#extend-diff-ignore = "(^|/)(config\.sub.*|config\.guess|Makefile|src/tools/nxdevcfg/flags.cpp)$"