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

Topics - Luis Montaño

#1
Hi everyone.
1) Is there a way to create thresholds if a event keeps for last n minutes.
For example, alert if a node is down for more than 5 minutes or alert if bandwith is above xxx for more than 10 minutes?

2) I need to check for network interfaces error and create an alert if error on some interface increase, I suppose that I have tu use the option "diff with previous value" do you have any example?
#2
Hi everyone,
I have implemented netxms server with sql server 2016 and I have enabled reporting module. At the moment I can execute predefined report "Alarms Resolution time"
Also I have downloaded JasperStudio to create reports and I can view the report properly (On Jasper Studio Console). However, I would like to generate .jar file to integrate it with netxms.
I have seen some recomendation regarding use "maven package" command to generate .jar files. I have installed maven on windows but I realize that need a pom.xml file to make it wok properly.
Anyone  has a quick guide that I can follow?. I have seen that file (pom.xml) on java projects. It does mean that I have to use a java IDE like eclipse and jasper complement?.
What do you think would be the best way to do it?
#3
Hi,

I'm using ActionShellExec option in the configuration file to execute a command on a remote host.
I have the following is my configuration file:

##############################################################config file
MasterServers = CPRG-MRED
ConfigIncludeDir = C:\NetXMS\etc\nxagentd.conf.d
LogFile = {syslog}
FileStore = C:\NetXMS\var
SubAgent = ecs.nsm
SubAgent = filemgr.nsm
SubAgent = ping.nsm
SubAgent = logwatch.nsm
SubAgent = portcheck.nsm
SubAgent = winperf.nsm
SubAgent = wmi.nsm
ActionShellExec=DisplayServices:wmic service get DisplayName,name,startname
##############################################################config file

It works fine , but the problem is when I configure that option in a policy :


<config>
   <agent>
      <!-- there can be added comment -->
      <MasterServers>X.X.X.X</MasterServers>
      <ConfigIncludeDir>C:\NetXMS\etc\nxagentd.conf.d</ConfigIncludeDir>
      <FileStore>C:\NetXMS\var</FileStore>
      <LogFile>{syslog}</LogFile>
      
      ###################################### INI SUBAGENTES
      <SubAgent>ecs.nsm</SubAgent>
      <SubAgent>filemgr.nsm</SubAgent>
      <SubAgent>ping.nsm</SubAgent>
      <SubAgent>logwatch.nsm</SubAgent>
      <SubAgent>portcheck.nsm</SubAgent>
      <SubAgent>winperf.nsm</SubAgent>
      <SubAgent>wmi.nsm</SubAgent>
      <SubAgent>ssh.nsm</SubAgent>   
      <SubAgent>netsvc.nsm</SubAgent>
      <SubAgent>dbquery.nsm</SubAgent>
      ###################################### FIN SUBAGENTES

      <ActionShellExec>DisplayServices:wmic service get DisplayName,name,startname</ActionShellExec>
            
   </agent>
   
   <filemgr>
      <RootFolder>C:\</RootFolder> # read/write access
      <RootFolder>D:\</RootFolder> # read/write access
   </filemgr>

   <WinPerf>
      <EnableDefaultCounters>yes</EnableDefaultCounters>
   </WinPerf>
</config>

It doesnt works anymore and I get an error: Cannot execute action on node CPRG-MCFE: Communication failure
#4
Feature Requests / Find Device per MAC Address
March 03, 2018, 01:24:24 AM
Hi

Some time ago, you created a functionality that allowed you to search for an object created in netxms by its IP address. This functionality is great.
It would be nice if they could search for a device by its MAC address. For example, although the switches have many MAC addresses, they have one that serves to identify the device. This serves for example; when the STP topology is calculated.
Being able to search for a device of this type by its MAC address, would help in cases of problem solving.
#5

Hello,

Please, help me with this topic. I defined the ThresholdRepeatInterval in 600 seconds. All alarms are issued again after 10 minutes in case they have not been resolved.
However, after updating to netxms 2.2.3, I realized that it is not taking into account the time defined in ThresholdRepeatInterval for the DCI that have a script as a threshold.
Probe configuring the "Repeat Interval" directly in a DCI but it does not work. I do not know if it is an error of this version?

my script is the next:

ifName = $dci->name;
indexArray = SplitString(ifName,".");
ifIndex = indexArray[indexArray->size - 1];
interface = GetInterfaceObject($node, ifIndex);
ifSpeed = interface->speed;
actualSpeed = $1;
if (actualSpeed > 0 && ifSpeed > 0)
{
   usedBandwidthPerc = format((int64 (actualSpeed) * 100) / int64(ifSpeed),1,2);
//   trace(0,$node->name);
//   trace(0,"ifIndex-> " . ifIndex);
//   trace(0,"ifSpeed-> " . ifSpeed);
//   trace(0,"ActualSpeed-> " . actualSpeed);
//   trace(0,"usedPercentage-> " . usedBandwidthPerc);
}
else
{
   usedBandwidthPerc = 0;
}
if (usedBandwidthPerc >= 80)
{
   return true;
}
else{
   return false;
}



#6

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;
}
#7
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?
#8
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)
#9
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
#10
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.
#11
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