Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - testos

#1
Todayyyyy!!! Good news!!!  :o
Thank you very much Victor.

Best regards.
#2
Hi

When have you planed to release 1.2.10 version?
I can not compile 1.2.9 version for Debian 7 X64 box:
Quotemake[3]: se ingresa al directorio `/root/netxms-agent/netxms-1.2.9/src/libnetxms'
  CXX    libnetxms_la-agent.lo
stdin:1: error: character not allowed to start a syntax specifier
make[3]: *** [libnetxms_la-agent.lo] Error 1

Best regards
#3
millerpaint,
I apply this template to nodes that I need to know if my Internet Service Provider meets the Service Level Agreements availability contracted, ie all remote nodes.

Best regads.
#4
Hi.

I add a template for node availability calculation parameters. You can get additional information on this wiki entry:
http://wiki.netxms.org/wiki/MTBF_%28Mean_Time_Between_Failures%29_and_MTTR_%28Mean_Time_To_Repair%29_Calculation

Best regards.
#5
Hi Victor.

Thank you very much for your help.
Based on your proposal, I think that this requirement can be simplified to just two steps:
1. - Create a template called say "Availability" with the four DCIs shown in the image
       "Availability template DCIs.png". Transformation scripts for each DCI are these
     
       For "Failures" DCI
       
Quotereturn GetCustomAttribute($node, "NumFailures");

       For "MTBF (hours)" DCI
       
Quotereturn GetCustomAttribute($node, "mtbf");

       For "MTTR (hours)" DCI
       
Quotereturn GetCustomAttribute($node, "mttr");

       For "Node availability (percentage)" DCI
       
Quote// This script calculates MTTR, MTBF and perAvailability parameters and stores them in custom attributes
// Initialize some custom attributes the first time.
// Undefined attributes are created by SetCustomAttribute function automatically
CurrentStatus = GetDCIValue($node, FindDCIByName($node, "Status"));
PreviousState = GetCustomAttribute($node, "PreviousState");
if (PreviousState == null)
{ // In the first time, previous state is null
   SetCustomAttribute($node, "PreviousState", CurrentStatus);
   SetCustomAttribute($node, "TimeStamp", time());   
   SetCustomAttribute($node, "NumFailures", 0); 
   SetCustomAttribute($node, "TotalUptime", 0);
   SetCustomAttribute($node, "TotalDowntime", 0);
   return 100;
}

// From here the 2nd and subsequent times
NumFailures = GetCustomAttribute($node, "NumFailures");
LastTime = time() - GetCustomAttribute($node, "TimeStamp");

// Status is up
if (CurrentStatus == 0)
{
   if (PreviousState != CurrentStatus)
   {   // just changed to up
      // update mttr
      TotalDowntime = GetCustomAttribute($node, "TotalDowntime") + LastTime;
      mttr = TotalDowntime / ((NumFailures == 0) ? 1 : NumFailures) / 3600;   // to prevent division by ze
      SetCustomAttribute($node, "TotalDowntime", TotalDowntime);
      SetCustomAttribute($node, "mttr", mttr);
   }
   else
   {      // still up
      // update mtbf
      TotalUptime = GetCustomAttribute($node, "TotalUptime") + LastTime;
      mtbf = TotalUptime / ((NumFailures == 0) ? 1 : NumFailures) / 3600;   // to prevent division by zero
      SetCustomAttribute($node, "TotalUptime", TotalUptime);
      SetCustomAttribute($node, "mtbf", mtbf);
   }
}

// Status is down
if (CurrentStatus == 4)
{
   if (PreviousState != CurrentStatus)
   {   // just changed to down
      // update mtbf
      NumFailures++;
      TotalUptime = GetCustomAttribute($node, "TotalUptime") + LastTime;
      mtbf = TotalUptime / NumFailures / 3600;
      SetCustomAttribute($node, "NumFailures", NumFailures);
      SetCustomAttribute($node, "TotalUptime", TotalUptime);
      SetCustomAttribute($node, "mtbf", mtbf);
   }
   else
   {   // still down
      // update mttr
      TotalDowntime = GetCustomAttribute($node, "TotalDowntime") + LastTime;
      mttr = TotalDowntime / NumFailures / 3600;
      SetCustomAttribute($node, "TotalDowntime", TotalDowntime);
      SetCustomAttribute($node, "mttr", mttr);
      
   }
}

If (CurrentStatus == 0 || CurrentStatus == 4)
{
   // Save previous state and timestamp
   SetCustomAttribute($node, "PreviousState", CurrentStatus);
   SetCustomAttribute($node, "TimeStamp", time());   

   // perAvailability section
   TotalUptime = GetCustomAttribute($node, "TotalUptime");
   TotalDowntime = GetCustomAttribute($node, "TotalDowntime");
   perAvailability = TotalUptime / (TotalUptime + TotalDowntime) * 100;
   SetCustomAttribute($node, "perAvailability", perAvailability);

   return perAvailability;
}



2. - Apply manually previous template to nodes required or apply this template automatically to nodes filtered by custom script (Properties -> Automatic Apply Rules).


In this way, we avoid having to define custom attributes (now created by the fourth transformation script), events, actions, event processing policy rules, etc.
In addition, the four DCIs are updated at each polling interval.
Only supports up (Normal = 0) and down (Critical = 4) node status.

Best regards.
#6
Announcements / Re: NxShell
February 17, 2013, 03:21:35 AM
Hi Alex.

Thanks for the upgrade to 2.7 version and for the Jython versions clarification. Now I can add current versions of modules I need. It is also possible to list all availables modules (in the previous version modules command gave me an error):
QuoteNetXMS 1.2.6 Interactive Shell
>>> import xlrd
>>> help()

Welcome to Python 2.7!  This is the online help utility.

If this is your first time using Python, you should definitely check out
the tutorial on the Internet at http://docs.python.org/tutorial/.

Enter the name of any module, keyword, or topic to get help on writing
Python programs and using Python modules.  To quit this help utility and
return to the interpreter, just type "quit".

To get a list of available modules, keywords, or topics, type "modules",
"keywords", or "topics".  Each module also comes with a one-line summary
of what it does; to list the modules whose summaries contain a given word
such as "spam", type "modules spam".

help> modules

Please wait a moment while I gather a list of all available modules...

BaseHTTPServer      codecs              jffi                sched
CGIHTTPServer       codeop              json                select
ConfigParser        collections         keyword             sets
Cookie              colorsys            linecache           setuptools
DocXMLRPCServer     command             locale              sgmllib
HTMLParser          commands            logging             sha
MimeWriter          compileall          macpath             shelve
Queue               compiler            macurl2path         shlex
SimpleHTTPServer    contextlib          mailbox             shutil
SimpleXMLRPCServer  cookielib           mailcap             signal
SocketServer        copy                markupbase          site
StringIO            copy_reg            marshal             smtpd
UserDict            csv                 math                smtplib
UserList            ctypes              md5                 sndhdr
UserString          datetime            mhlib               socket
_LWPCookieJar       dbexts              mime                sre
_MozillaCookieJar   decimal             mimetools           sre_compile
__builtin__         difflib             mimetypes           sre_constants
__future__          dircache            mimify              sre_parse
_abcoll             dis                 modjy               ssl
_ast                distutils           multifile           stat
_codecs             doctest             mutex               string
_collections        dom                 netrc               struct
_csv                dumbdbm             new                 subprocess
_fsum               dummy_thread        nntplib             symbol
_functools          dummy_threading     nt                  synchronize
_google_ipaddr_r234 easy_install        ntpath              sys
_hashlib            email               nturl2path          sysconfig
_io                 encodings           numbers             tabnanny
_jyio               errno               opcode              tarfile
_marshal            etree               operator            telnetlib
_py_compile         exceptions          optparse            tempfile
_pyio               filecmp             os                  test
_random             fileinput           parsers             tests
_rawffi             fnmatch             pawt                textwrap
_sre                formatter           pdb                 this
_strptime           fpformat            pickle              thread
_systemrestart      fractions           pickletools         threading
_threading          ftplib              pipes               time
_threading_local    functools           pkg_resources       timeit
_warnings           future_builtins     pkgutil             token
_weakref            gc                  platform            tokenize
_weakrefset         genericpath         plistlib            trace
abc                 getopt              popen2              traceback
aifc                getpass             poplib              tty
anydbm              gettext             posixfile           types
argparse            glob                posixpath           ucnhash
array               grp                 pprint              unicodedata
ast                 gzip                profile             unittest
asynchat            hashlib             pstats              urllib
asyncore            heapq               pty                 urllib2
atexit              hmac                pwd                 urlparse
base64              htmlentitydefs      py_compile          user
bdb                 htmllib             pycimport           uu
binascii            httplib             pyclbr              uuid
binhex              ihooks              pydoc               warnings
bisect              imaplib             pyexpat             weakref
bz2                 imghdr              quopri              whichdb
cPickle             imp                 random              wsgiref
cStringIO           importlib           re                  xdrlib
calendar            inspect             readline            xlrd
cgi                 io                  repr                xml
cgitb               isql                rfc822              xmllib
chunk               itertools           rlcompleter         xmlrpclib
cmath               jarray              robotparser         zipfile
cmd                 javapath            runpy               zipimport
code                javashell           sax                 zlib

Enter any module name to get more help.  Or, type "modules spam" to search
for modules whose descriptions contain the word "spam".

help>

I will continue testing this good tool...

#7
Announcements / Re: NxShell
February 16, 2013, 04:19:53 AM
Hi Alex.

I'm trying NetXMS 1.2.5 Interactive Shell and and I can see it's a nice tool. It is much easier any automatic bulk operation.

QuoteNetXMS 1.2.5 Interactive Shell
>>> help()

Welcome to Python 2.5!  This is the online help utility.

But Interactive Shell use python 2.5 vesion and the latest current production versions is Python 3.3.0
I'm trying to modify nxshell-1.2.5.jar contents to replace the lib directory from 3.3.0 version, but then I get an error in org.python.core
How can I upgrade python shell to 3.3.0 version?
I need to import some Python modules which only work with 2.7 version and later.

Best regards.
#8
General Support / Re: Out of memory NetXMS v1.2.5
February 07, 2013, 12:51:25 PM

It seems like a hardware failure.
Centos kernel is not supposed to panic under any circumstance.
There's no "normal" circumstances beyond a hardware failure or kernel bug that should cause one.
Try to run memtest86 or memtest86+ and performs a BIOS address test in physical machine.
#9
General Support / Re: Out of memory NetXMS v1.2.5
February 06, 2013, 09:53:58 AM
What version of MySQL are you using?
Check if there is something strange in similar files:
/var/log/messages
/var/log/nxagentd
/var/log/netxmsd.log
/var/log/mysqld.log
etc.
#10
General Support / Re: Deleted nodes still throwing events
February 05, 2013, 01:26:07 PM
Hi.

Is a good practice to check, repair and backup database every night. In linux you can make a bash script like this:
Quote# Check_db.sh
#
# Check, repair and backup netxms database in remote host
#
### Variables ###
date=`date +%d-%m-%Y`
DateTimeStamp="date +%d/%m/%Y-%H:%M:%S"
# Paths
logfile="/var/log/mysql_backup.log"
tempbackdir="/tmp"
remotebackdir="/datos/backup/mysql_netxms_pro"
sourcedir="/var/lib/mysql"

### Check and repair data base ###
### First stop netxms agent and server, and then repair netxms data base using nxdbmgr
/usr/bin/killall nxagentd >> $logfile
/usr/bin/killall netxmsd >> $logfile
/usr/local/bin/nxdbmgr -f check >> $logfile
sleep 60
### Repair all mysql database (-Avrs parametres can be different depending on mysql version)
echo "#################################################" >> $logfile
echo `$DateTimeStamp` - All processes have been stopped. Analysis and repair MySQL DB started: >> $logfile
/usr/bin/mysqlcheck -Avrs -uroot -pxxxxxxxxx >> $logfile

### Backup databases locally whit compression ###
### Stop mysqld deamon
/sbin/service mysqld stop
sleep 60
### Compress with tar command
echo `$DateTimeStamp` - MySQL databases backup started: >> $logfile
tar -pcjvf $tempbackdir/mysql_backup-$date.tar.bz2 $sourcedir/ ### >> $logfile
tar -tjvf $backdir/mysql_backup-$date.tar.bz2 $sourcedir/ ### >> $logfile
sleep 60
/sbin/service mysqld start >> $logfile
/usr/local/bin/netxmsd -d >> $logfile
/usr/local/bin/nxagentd -d >> $logfile
echo `$DateTimeStamp` - MySQL databases backup completed. All netxms processes have been started >> $logfile

### Move local backup to remote server # # #
### Note that the remote server must contain the server's public key (generated with the
###"ssh-keygen-t rsa" command) from which you send the backup in
###"$HOME/.ssh/authorized_keys" file
scp $tempbackdir/mysql_backup-$date.tar.bz2 [email protected]:$remotebackdir >> $logfile
echo `$DateTimeStamp` - Local backup has been moved to remote server >> $logfile

### Remove daily backups over 32 days old on the remote server ###
ssh [email protected] find $remotebackdir/ -name '*.tar.bz2' -type f -mtime +32 -exec "rm -f {} \;" >> $logfile
echo `$DateTimeStamp` - Remote backups over 32 days old have been removed >> $logfile
echo "###" >> $logfile
echo "###" >> $logfile

exit 0

Finally you must assign the appropriate permissions to the script and then schedule it in crontab:
Quote00 3 * * * /usr/local/scripts/Check_db.sh


Best regards.
#11
Announcements / Re: NxShell
February 04, 2013, 10:49:21 AM
Thank you very much for your support, it is just what I needed.
nxshell opens a world of great possibilities for large environments!

Best regards.
#12
Announcements / Re: NxShell
January 31, 2013, 07:18:33 PM
I had planned to read nodes from a file and check if exist in certain containers. If they did not exist would be created and then:
- Modify some node properties: polling options, comments, custom attributes, calculation status, etc.
- Manage network interfaces only having a certain name, others unmanaged.
- Create DCI for managed interfaces.
- Edit some properties for the previous DCIs (description, transformation, thresholds, etc..)
- Create other DCI for node (MTBF & MTTR -https://www.netxms.org/forum/general-support/mtbf-%28mean-time-between-failures%29-and-mttr-%28mean-time-to-repair%29/msg8953/#msg8953-, etc.)

All this for about 400 nodes  :-[.

Best regards.
#13
Announcements / Re: NxShell
January 30, 2013, 04:08:21 PM
Hello Alex.

Thanks for this tool, I'm very interested in trying it.
Is it possible to automate any task we can be done by console?
Is there available other sample scripts in addition to the one in the wiki?

Best regards.
#14
Hi Victor.

QuoteIs it for all addresses or only for some?
This happens with every address (IP/MAC) I've tried to find.

QuoteWhat switches you are using in your network?
Cisco Nexus n5000, Cisco Nexus 1010, Cisco Nexus 1000, Cisco Catalyst 4500, Cisco Catalyst s72033, Cisco Catalyst C3750E, Cisco Catalyst C3500XL, Cisco 2801, Cisco Catalyst c6sup2_rp, Cisco Catalyst C2950, Cisco Catalyst C2970, Cisco Catalyst CBS31X0, HP Procurve 2810-24G, HP Procurve 1810G, HP Procurve 2910al-48G, HP Procurve 2650, HP Procurve 2824, etc.

QuoteIs it possible to read forwarding database from switches (Tools -> Info -> Switch forwarding database)?
Yes for:
- Cisco Catalyst s72033 (only 1 interface to several)
- Cisco Catalyst C3750E (only 2 interfaces to several)
- Cisco Nexus 1000 (only 1 interface to several)
- Cisco Catalyst C2970 (only 1 interface to several)
- Cisco Catalyst C3500XL
- HP Procurve 2810-24G
- HP Procurve 1810G
- HP Procurve 2910al-48G
- HP Procurve 2650
- HP Procurve 2824


Best regards.
#15
Hi.

When I use in NetXMS 1.2.4 either "Find IP Address" or "Find MAC Address" tools, I get the following warning message:

QuoteConnection point information cannot be found

Best regards.