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 - Luis Montaño

#16
Yes your point is valid but I know that is possible, if I change the script and return any value, It appears on dci description.
I would like to know how to do it.
#17

Hi everyone, I have an issue.
I don't know if I'm doing something wrong.
I have following script that I'm going to use to avoid collection of wrong values (hundred of TB)  obtained from snmp "iftable"
I dont get any error (of sintaxis) but the script is not performing any action.
In adition, there is a way to debug this scripts used on transformation tab?. I'm using Windows Server 2012R2 as Netxms Server and PostgreSQL

[script]
interface = GetInterfaceObject($node, ((int)$dci->instance));
speed = interface->speed;
if ($1 > speed){
   return 0;
}
else{
   return $1 * 8;
}
#18
Hello everyone, do you know how can I call a script from a dci description?
for example, this is the description of a dci: TrafficIN %{script:getIfNameByName({instance-name})}
this is my script:
scriptName:getIfNameByName
sub getIfName(netString)
{
     if (length(netString) > 0)
     array a;
     a [length(netString)];
     a = SplitString(netString, " ");
     return (a [
                       (a->size)-1
                  ]
              );
}
return getIfName($1);
how can I call that script and send "instance-name" as parameter?
#19
General Support / Regex on Instance Discovery
July 04, 2017, 09:32:44 PM
Hi everyone,
I was looking for a way to create a dci for network traffic on all interface address.
I'm using a template and instance discovery for the process. Now I know that I can use the agent list "Net.InterfaceList" to get interface index and then with Net.Interface.BytesIn64({instance}) get the data I need.
I use following Instance discovery filter script that Alex Kirhenshtein created:
if ($1 ~= "^([0-9]+) .*")
{
       return %(true, $1); // at this point $1 contains first matching group
}
return false;

I was trying to modify regex string to "^[0-9](?!.*127\.0\.0\.1)" to avoid loopback interface.
But I get error "execution error: Error 18 in line 3: Invalid regular expression"
As I couldn't find a way to do it, I use following script
if ((index($1,"127.0.0.1/8")==0)&&(index($1,"::1/128")==0)&&(index($1,"fe80:")==0))
{
     if ($1 ~= "^([0-9]+) .*")
     {
          return %(true, $1); // at this point $1 contains first matching group
     }
}
return false;

Now it works but I tested my regex string on others apps and it worked fine.
Also I was reading that with regex you can "split" the agent list string into multiple values, for example $1:iface Index, $2:IP Address, etc.
although now is working, I'm a bit confuse about regex expressions on netxms. how could I do it the same I do but with regex?
also, when you use regex to get multiple values from a string, how could you asign to multiple variables ($1,$2,etc)
#20
Thanks for your help   :D

As you said, I have to install that on my Client PC and It works.
#21
Hi,

I have read on some places that if I want to modify supported ciphers I have to use "AllowedCiphers" and/or "EnabledCiphers" options
https://wiki.netxms.org/wiki/Server_Configuration_Variables
https://media.readthedocs.org/pdf/netxms-admin/latest/netxms-admin.pdf

I want to enable only AES256, so I set AllowedCiphers on 1, then restart NetXMS Server and I get a warning "NetXMS Server doesnt support encryption".
I have netxms server 2.08 running on windows server 2012r2, my version doesn't has EnabledCiphers option, so I create the variable and set it on 1.
But I get same mesage. If I set AllowedCiphers to 17, it works.
Do I'm doing something wrong?

Best Regards
#22
General Support / Re: Presets greater than 12 hour
February 07, 2017, 04:15:51 PM
Quote from: Victor Kirhenshtein on February 06, 2017, 10:00:41 AM
Hi,

it was supposed to be fixed in 2.1-M2. Could you please give more details about your environment when 2.1-M2 is now working? Also, could you please try different browsers?

Best regards,
Victor

I have this issue with Netxms Console 2.1-M2 and previous, Web Console 2.1-M2 and previous(Chrome and Firefox).
I have used Windows7 64 bits +Sqlite and Windows server 2012 + MSSQL Server.
#23
General Support / Re: Script as Instance Discovery
February 06, 2017, 06:28:37 PM
Thanks For the Help.
It works.  :D
#24
General Support / Script as Instance Discovery
February 03, 2017, 01:49:59 AM
Hi all,
sorry for my english, I'm from Ecuador and I don't speak English very well.

I'm using netxms and I think that its great. I have the next problem:
I have some switches cisco 2960, I want to create a template to poll consumed ram from them
I checked cisco documentation and I know that I can get used ram wid oid ".1.3.6.1.4.1.9.9.48.1.1.1.5.1" and free ram with oid ".1.3.6.1.4.1.9.9.48.1.1.1.6.1"
those oid are not tables. The problem is that I dont have a oid to poll used ram in percentage so I create an script that I called SNMPOperations wich calculate percentage consumed.
I have tried this in several ways and I can't figure out what is wrong.
For example:
If I create the script with the function GetValueSNMP that recive a node object and return consumed ram (in percentage)

Script version 1:
sub GetValueSNMP(parameter)
{
   transport = CreateSNMPTransport(parameter);   // "parameter" is a node object
   usedRAM = SNMPGetValue(transport, ".1.3.6.1.4.1.9.9.48.1.1.1.5.1");
   freeRAM = SNMPGetValue(transport, ".1.3.6.1.4.1.9.9.48.1.1.1.6.1");
   totalRAM = usedRAM + freeRAM;
   usedRAMPercentage = ((usedRAM * 100)/totalRAM);
   return usedRAMPercentage;
}
I'm calling previous script in TransformationTab (doesn't work) and Instance Discovery(doesn't work)  in the following way:

use SNMPOperations;
return GetValueSNMP($node);



Script version 2:
   transport = CreateSNMPTransport($node);
   usedRAM = SNMPGetValue(transport, ".1.3.6.1.4.1.9.9.48.1.1.1.5.1");
   freeRAM = SNMPGetValue(transport, ".1.3.6.1.4.1.9.9.48.1.1.1.6.1");
   totalRAM = usedRAM + freeRAM;
   usedRAMPercentage = ((usedRAM * 100)/totalRAM);
   return usedRAMPercentage;
I'm using previous script in Instance Discovery(doesn't work)

I dont know if the script is wrong, or If I'm doing something wrong on dci template.
Please your help.
#25
General Support / Re: Presets greater than 12 hour
February 02, 2017, 11:48:25 PM
aalexson Thanks for the help.
Also to inform you. I tried version "2.1-M2" and the issue persist.
Maybe you know if this bug has a number?
#26
General Support / Re: Presets greater than 12 hour
February 01, 2017, 08:55:05 PM
I have the same issue with version 2.08 and beta.
Is this a bug ?
Sorry, I want to make sure that I don't have anything wrong in my configuration.
#27
General Support / Re: Presets greater than 12 hour
November 29, 2016, 11:52:07 PM
I have the same problem with the version 2.07.
Do I have the same problem if I use a linux distro?
#28
General Support / Re: Presets greater than 12 hour
September 05, 2016, 06:25:33 PM
I have the same problem with both consoles, desktop and web.
Netxms server(2.05) is installed on Windows Server 2012 + SQL server 2012
Netxms management console(2.05) is installed on Windows 10

Best Regards
#29
General Support / Presets greater than 12 hour
September 05, 2016, 09:10:51 AM
Hi Everyone.
I created a graph on netxms.
It's cool when I select a preset lower that 12 hours, see attachment (preset1.PNG)
But when I select a preset greater than 12 hours, information about day and hours disappear,see attachment(preset2.PNG).
How can I solve this?
Thanks for the help.
pd: sorry if I make a mistake, I don't speak english very well