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 - jhuliagraziella

#1
General Support / Stable Release 2.0 ?
May 15, 2015, 08:59:19 PM
Do you have any prediction of when will be the next stable release? :)

Thanks,

Jhúlia Graziella
#2
In this situation yes, because we won't monitore this nodes using SNMP, but I made this way so the script can be reused to populate the rest of the nodes!

Thank you,
Jhúlia Graziella
#3
General Support / Re: Automatic bind on zoneID
May 13, 2015, 04:32:07 PM
Quote from: d-ray on May 12, 2015, 12:06:57 PM
is it possible to use the zonename in text?

Have you tried using FindObject()?
That way you can search it by the name in text.

https://wiki.netxms.org/wiki/NXSL:FindObject
#4
Quote from: Victor Kirhenshtein on May 13, 2015, 04:12:11 PM
Hi!

SNMP version constants are a bit illogical (for historical reasons). They are following:

0 = SNMP v1
1 = SNMP v2
3 = SNMP v3

2 is an invalid value, so it falls back to v1 (as any invalid value will do). You can use constants from AbstractNode class:

AbstractNode.SNMP_VERSION_1, AbstractNode.SNMP_VERSION_2C, AbstractNode.SNMP_VERSION_3

Best regards,
Victor

Oh, okay! Thank you very much! :D I'll correct it.
#5
I have attached the script here.
I'm sorry, but all my comments are written in portuguese so here goes a little explanation about the code:

In the beggining of the script it's defined the name of the container in which the nodes will be created. It checks if there already is a container with that name and if there isn't we create it. In any case we get the ID of the container of that name.
Then, it opens an archive named input.csv with reading option and mark its delimiter as ';'.
This archive has the following format:

NAMEORIP;10.106.7.252;COMMUNITY;0rqu1dea;SNMPPORT;161;SNMPVERSION;V2C;SEEDNAME;a-rg-fcc-arq-001-araraquara;ACCESSMODE;ICMPSNMP;ADDRESSFORMAT;AUTOADDRESS;
NAMEORIP;10.11.133.170;COMMUNITY;0rqu1dea;SNMPPORT;161;SNMPVERSION;V2C;SEEDNAME;a-rg-fcc-ula-085-cadministrativo;ACCESSMODE;ICMPSNMP;ADDRESSFORMAT;AUTOADDRESS;
NAMEORIP;10.224.0.110;SNMPPORT;161;SNMPVERSION;V2C;SEEDNAME;a-rg-fcc-ula-301-image-01;ACCESSMODE;ICMPONLY;ADDRESSFORMAT;AUTOADDRESS;;;
NAMEORIP;10.5.1.132;COMMUNITY;0rqu1dea;SNMPPORT;161;SNMPVERSION;V2C;SEEDNAME;a-rg-fcc-bet-511-guaruja;ACCESSMODE;ICMPSNMP;ADDRESSFORMAT;AUTOADDRESS;
NAMEORIP;10.5.1.134;SNMPPORT;161;SNMPVERSION;V2C;SEEDNAME;a-rg-fcc-bhe-010-liberdade;ACCESSMODE;ICMPONLY;ADDRESSFORMAT;AUTOADDRESS;;;

Above there are some lines of the archive. It's in this format because this is how it was exported by our running network management system (yeah I know it looks ugly!). As you can see, not all collumns are filled for all lines, and the names in upercase letters represent what parameter comes next, so we "treat" this in the if-chain by reading 2 collumns at a time and checking what that collumn represents. We save the data collected in variables.

Then it's the creation part:
First it checks if an object with that name already exists. If so, it doesn't create it. If not, it calls the methods of classes NXCObjectCreationData and NXCObjectModificationData and create it with the parameters got from the archive.

Sorry about my not-so-good english, hope I made it clear!  ;D
If you have any questions about anything feel free to ask me, I'll be glad to explain!

Regards,

Jhúlia Graziella
#6
Thank you very much!  ;D
#7
I made a script in python to populate a network, in which I condigure the name, IP, snmp port, snmp community and so.

In class org.netxms.client.NXCObjectModificationData, when using the method void setSnmpVersion(int snmpVersion), I noticed the following:
- If I pass number 1 as a paramether to the method, it configures as version 2c;
- If I pass number 2 as a paramether to the method, it configures as version 1.

Is this supposed to happen? Because of that, in my script I wrote this to configure correctly:

   if objectSnmpVersion == "V1":
      objectSnmpVersion = 2
   elif objectSnmpVersion == "V2C":
      objectSnmpVersion = 1
   elif objectSnmpVersion == "V3":
      objectSnmpVersion = 3
   md.setSnmpVersion(objectSnmpVersion)
      
but didnt' like it...  ???
#8
Quote from: tomaskir on May 09, 2015, 11:13:04 AM
As I said before, use auto-bind script on the template.

What you want is already possible, just use the script that I gave you a few posts ago.

It will bind the nodes under the folder to the template during a configuration poll.

I didn't want to use scripts because then an operator would have troubles when trying to change something... And I imagine the changes needed to turn possible what I asked for are not very complicated, but no problem! :)
Thank you very much for your help!
#9
General Support / Re: Automatic bind on zoneID
May 08, 2015, 10:07:52 PM
I hope this could help! :D

sub main()
{
   if (($node)->zoneId == 106)
   {
      return 1;
   }
   return 0;
}

Regards,

Jhúlia Graziella
#10
And about moving nodes from a zone to another, this is the message I get:

Cannot change zone for node a-rg-fcc-ula-301-image-01 [6644]: Address already in use
Address already in use

If I move node a-rg-fcc-ula-301-image-01 from zone A to zone B, it works fine. But if I try to move it back to zone A I get this error. (And the same error if I try to move some node from zone B to A and then back to zone B.
I started to think this may be because the time the housekeeper runs: i'm using postgre, so maybe the DB isn't properly refreshed without the housekeeper executing vaccum?
#11
Sorry, sorry, sorry. I mixed my posts and am embarassed now.  :-[

Quote from: jhuliagraziella on May 07, 2015, 09:06:47 PM
Feeling like a newbie here, but how exactly do I configure to execute this type of script everytime I delete something? (I'm talking about deletion by clicking with mouse's right button and then selecting delete, because that's how the operators will probably do it).
If this is possible almost ALL my problems can be resolved by configuring this!  ;D

Correction:
Feeling like a newbie here, but how exactly do I configure to execute this type of script everytime I try to apply a template? (I'm talking about applying a template by clicking with mouse's right button and then selecting apply and selecting the nodes I want to apply, because that's how the operators will probably do it).
If this is possible almost ALL my problems can be resolved by configuring this!  ;D

I organized my node in containers to make it easier to see, but when applying templates this way of organizing really slows my job, because I have to open every container and select just the nodes I want and that way mistakes happen easily: I gotta be careful not to select nodes that shouldn't have the template applied and if I accidentaly select something that isn't a node (like a container) I get the following error:

Cannot apply data collection template: Invalid object ID
Invalid object ID


What I wanted was: if i tried to apply a template to a container, all container's children nodes that are "aplliable" would be.
#12
I'm sorry about my english. By "excluded" I mean deleted.
#13
Quote from: tomaskir on May 07, 2015, 08:18:07 PM
This is already entirely possible.

Simply use auto-bind scripts...
Here is an example:

parents = GetNodeParents($node);

foreach(p : parents)
{
  // if the node has a parent with this name
  if (p->name == "Something")
  {
// auto-bind node
return true;
}

// otherwise do not auto-bind the node
return false;



Feeling like a newbie here, but how exactly do I configure to execute this type of script everytime I delete something? (I'm talking about deletion by clicking with mouse's right button and then selecting delete, because that's how the operators will probably do it).
If this is possible almost ALL my problems can be resolved by configuring this!  ;D
#14
I'm currently playing with NetXMS and populated my network with about 1000 nodes and then I created a new Zone and put an agent to be responsible for polling some nodes that are under a proxy server.
Now I'm dealing with the followint issue: whenever I exclude a node from the Infrastructure Services container it DOESN'T get excluded from its corresponding Zone on Entire Network! And if I try to re-create a node with same IP it returns an error because tecnically it already exists. So every time I exclude a node from Infrastructure Services I have to manually exclude it from Entire Network and it's kinda bugging me.
Another matter: if I move a node from a zone to another and then try to re-move it back to its initial zone it returns an error telling that the node already exists in that zone (but...wait, what? It does'nt, I have moved it!! D:  )

Any ideas of what I could do about this?  :'(

Thanks everyone for the great support,

Jhúlia Graziella
#15
Same  problem here.
I have a node that isn't accessible from my server and configurated an agent to poll it. I've tried remotely logging into the agent to ping this special node and everything worked fine.
The problem is: when I try to poll it from the server, even if I ask just for the status, it always stays as UNKNOWN. Any idea of what could be causing this?
I'm pretty sure my configuration is alright. The hostnames are correct and I've put the proxy in the agent.