News:

We really need your input in this questionnaire

Main Menu
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 - m1975Michael

#1
General Support / Re: Windows Service Install Hangs
December 16, 2014, 08:46:01 PM
This is actually a Windows XP machine.  I have tried the suggestions and stopping the services but the install still hangs.
#2
General Support / Re: Windows Service Install Hangs
December 11, 2014, 03:06:02 PM
The service was off.  I even uninstalled 1.2.16 and tried a fresh install of 1.2.17.  I made sure none of the services were installed before I attempted the fresh install.
#3
General Support / Windows Service Install Hangs
December 10, 2014, 05:55:02 PM
I have tried to install 1.2.17 on Windows but the install hangs when checking the netxms core service.  I get a check mark by Installing service.  It works correctly in 1.2.16.  Any suggestions?  Thank you for your assistance.
#4
I have it working now.  Somehow the $ from all of node (s) were removed.
#5
General Support / Set Primary Host Name to SNMP sysName
September 22, 2014, 03:33:56 PM
I am trying to set the primary host name to the SNMP sysName.  I have found a couple of scripts on the forum but I can not get either of them to work.

if (($node->snmpSysName != null) && ($node->snmpSysName != ""))
{
   RenameObject($node, $node->snmpSysName);
}


I receive the following error when I run this script in the server console.  ERROR: Script finished with error: Error 14 in line 1: Function or operation argument is not an object.

//rename node after configuration poll to snmp sysLocation
//if sysLocation is null then rename to node ip address
//also 3 custom attributes will be setted
// you can use this attributes in events with %{attribute_name} macros
//uncomment trace line and run netxmsd with -D1 param for logging

sub main()
{
  if ($1->isSNMP)
   {
  //trace(1,"hook executed for ".$1->ipAddr);
   transport = CreateSNMPTransport($1);
    if (transport == null)
    {
    //trace(1,"snmp transport error on ".$1->ipAddr);
    return -1;
    }
   
    location = SNMPGetValue(transport, ".1.3.6.1.2.1.1.6.0"); // sysLocation
    sysname = SNMPGetValue(transport, ".1.3.6.1.2.1.1.5.0");  // sysname
    uptime = SNMPGetValue(transport, ".1.3.6.1.2.1.1.3.0");   // uptime
   
    //trace(1,"[".location."], [".sysname."], [".uptime."]");
   
    if (location != null && location !="" && location!=" ")
     { 
         //trace(1,"attr location changed to ".location);
         RenameObject($1, location);
     }
    else
    {
         //trace(1,"error in location block");
         RenameObject($1, $1->ipAddr); //change name to node ip address
    }   
    if (sysname != null && sysname !="" && sysname !=" ")
    {
         SetCustomAttribute($1, "sysname", sysname); //set custom attribute for node snmp sysName
         //trace(1,"attr sysname changed to ".location);
    }
    else
    {
         //trace(1,"error in sysname block");
    }

    if (uptime != null)
    {
         SetCustomAttribute($1, "uptime", SecondsToUptime(uptime/100)); //set custom attribute uptime for node
         //trace(1,"attr uptime changed to ".SecondsToUptime(uptime/100));
    }
    else
    {
        //trace(1,"error in uptime block");
    }
   
    //trace(1,"end execution");
    SetCustomAttribute($1, "last_update",localtime(time())->mday.".".localtime(time())->mon.".".localtime(time())->year.", ".localtime(time())->hour.":".localtime(time())->min.":".localtime(time())->sec);       
  }
}



I receive the following error when I run this script in the server console.  ERROR: Script finished with error: Error 14 in line 9: Function or operation argument is not an object.

I tried to look at examples on the wiki but I really don't know how to script.  Any assistance would be greatly appreciated.  Thank you.
#6
General Support / Email Test
August 01, 2014, 04:01:12 PM
Is there a way I can test send an Email from NetXMS to verify Email is working properly? Thank you for your assistance.
#7
General Support / Re: SNMP Walk Error
July 21, 2014, 02:57:46 PM
Quote from: Victor Kirhenshtein on July 18, 2014, 01:06:30 PM
This message could popup if you try to call SNMP walk on non-node object (for example, template or cluster).

Best regards,
Victor

I was adding items to a template when I received that error message.  It would seem to me that you still should be able to walk the MIB even is in a template or even in the MIB browser.
#8
General Support / SNMP Walk Error
July 17, 2014, 07:33:26 PM
I am getting the following error message when I try to walk the tree.

"Walk MIB tree' had encounter a problem.
Cannot do SNMP MIB tree walk: Incompatible operation.

I have recompiled the MIB file.

Any suggestions would be helpful.  Thank you.

#9
General Support / Re: Polling Options Under Node
July 07, 2014, 03:58:30 PM
Quote from: Victor Kirhenshtein on July 07, 2014, 01:06:24 PM
Hi!

You have two options, and both requires script creation. One is to use nxshell script - there is an example of how to disable SNMP polling: http://wiki.netxms.org/wiki/Using_nxshell_to_automate_bulk_operations#Disable_SNMP_polling_for_node. Other option is to use NXSL script on server - you can use node enumeration example: http://wiki.netxms.org/wiki/Script_Example:_Enumerate_All_Nodes and add calls to methods enableAgent, enableConfigurationPolling, enableIcmp, enableSnmp, enableStatusPolling, enableTopologyPolling on node objects as needed. Each of these methods accepts true or false as parameter. For example, to disable agent for node you can call

n->enableAgent(false);

assuming that you have reference to node object in a variable n.

Best regards,
Victor


Thank you Victor for the information.  I like the bulk disable SNMP but I am not sure what options are available besides SNMP.  I would like to disable NetXMS agent for all pulls and disable usage of ICMP pings for status polling but I am not sure what to replace DISABLE_SNMP with.  I was looking in the scripting section but I have not found those specific options unless I am looking in the incorrect place.  Thank you for your continued assistance.
#10
General Support / Polling Options Under Node
July 03, 2014, 06:02:51 PM
How can I configure multiple nodes polling options. For example I need to configure a group of nodes to not get stats from ICMP pings and disable NetXMS agent polling.  Any assistance would be greatly appreciated.  Thank you.
#11
Quote from: Victor Kirhenshtein on June 15, 2014, 12:07:59 PM
Hi!

You don't have to use instance discovery to monitor single item. All you have to do is to put .1.3.6.1.4.1.11369.10.3.2.1.0 as "parameter" on general page. Make sure that instance discovery is off.

Best regards,
Victor

Can you please describe when and why you would use instance discovery?  Thank You.
#12
General Support / Re: Import List of IP Addresses
June 14, 2014, 02:04:57 PM
Quote from: andrey--k on June 14, 2014, 11:19:26 AM
See indentation example on wiki:
Quote
http://en.wikipedia.org/wiki/Python_syntax_and_semantics#Indentation

Thank you Andrey I understand now.  I was able to get your script to work.  It is much appreciated.
#13
General Support / Re: Import List of IP Addresses
June 13, 2014, 11:59:34 PM
Quote from: andrey--k on June 13, 2014, 04:22:24 PM
Sorry, but am running linux-only versions.

Hello, did some of the script get cut off.  Do you need closing statements for IF and For?
#14
I have been following the directions that you have presented me.  One thing I change was instead of Actions Configuration I just set up an Alarm.  I have not received the expected alarm.  The remoteAccess OID is .1.3.6.1.4.1.11369.10.3.2.  When I walk into it I get .1.3.6.1.4.1.11369.10.3.2.1.0, Type: integer, Value: 0.  The description in .1.3.6.1.4.1.11369.10.3.2.1 OID is Whether RA is enabled
0   Disable
1   Enable
Under General I changed the Data Type from String to Integer.  I did try String first.  Under Instance Discovery I have SNMP Walk - OIDs with .1.3.6.1.4.1.11369.10.3.2.1.0 as the OID.  Under Thresholds Instance named typed raEnabled corresponds to the .1.3.6.1.4.1.11369.10.3.2.1 OID.  I marked Process all thresholds. Function: Last polled value = 1 Operation equal to 1.  I have tried 0 also.  Activation event: is the event name I created.

The value should be 1 as remote access is enabled.

Last values for the device only shows the status.

I can't figure out why I am not receiving an alarm.  If any one has any suggestion it would be appreciated.
#15
General Support / Re: Import List of IP Addresses
June 13, 2014, 04:16:02 PM
Quote from: andrey--k on June 13, 2014, 08:20:55 AM
I have ready script for similar purpose.
from org.netxms.client.objects import GenericObject, Node, Template

rootObject = session.findObjectByName("FromFile")
#print rootObject
#print "\n"
if rootObject:
for nodeIP in open("discover.txt").readlines():
test = s.findObjectByName(nodeIP.strip())
if test:
print "Object exists\n"
else:
name = "IP%s" % nodeIP.strip()
newNode = NXCObjectCreationData(objects.GenericObject.OBJECT_NODE, name, rootObject.getObjectId());
newNode.setPrimaryName(nodeIP.strip())
try:
nodeId = session.createObject(newNode)
except:
print "exception create node\n"
pass
else:
if nodeId:
try:
s.pollNode(nodeId,2,None)
except:
print "exception make pool\n"
pass

Create file with ip list, delimited by newline (without whitespaces).
rename it to discover.txt

put all in one folder. (/home/nxuser/nxShell/)

Create folder "FromFile" via nxmc. New objects will be added there.
Run

java -Djava.io.tmpdir=/tmp/ -Dnetxms.server=127.0.0.1 -Dnetxms.login=admin -Dnetxms.password=netxms -jar /home/nxuser/nxShell/nxshell-1.2.14.jar nodesRemoveSoftwareScan.py


Script work slowly. For 600 ip it will take 3-5 hours but all nodes will be polled.
If you want to do it faster - comment or delete next lines from script:

if nodeId:
try:
s.pollNode(nodeId,2,None)
except:
print "exception make pool\n"
pass


Thank you for the script.  I am running the windows version of NetXMS anything I need to change in the script?  How do you run the script?