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

#241
Your example code works fine for me.

Are you sure you arent dealing with security issues as described here?
https://wiki.netxms.org/wiki/SG:Security_Issues

Here is the code I used:

// node class type
n=FindObject(507);
println("Trying for node...");
println("Name: " . n->name . " ID: " . n->id);
// this should not throw error
try {
  println("snmpSysName: " . n->snmpSysName);
} catch {
  println("Got an error for node!");
}
println("Type: " . n->type);

println("");

//Container class type
n=FindObject(851);
println("Trying for container...");
println("Name: " . n->name . " ID: " . n->id);
// this should throw error
try {
  println("snmpSysName: " . n->snmpSysName);
} catch {
  println("Got an error for container!");
}
println("Type: " . n->type);
#242
Quote from: ndaami on January 25, 2016, 03:05:05 PM
thanks for your reply,

okay i understood the idea ! My tomcat version is 8 and his default JAVA_OPTS is "-Djava.awt.headless=true -Xms128M" but i have some questions.

what's the difference between Xms and Xmx options ?
how to optimize such parameters, known that my os is ubuntu server 14 with 8 Gb RAM ?

finally should i use "-Djava.awt.headless=true -Xms1024M -Xmx1024M"

thanks again.
Xms is the amount of memory Tomcat allocates on startup.
Xmx is the max memory Tomcat will allocate.

What these values should be set at depends on how many applications are running on your Tomcat, and how many users are using them.
For NetXMS Console, I would recommend atleast 256MB of RAM per concurrent user of your web UI.

All together I recommend something like this:

-Djava.awt.headless=true -Djava.security.egd=file:/dev/./urandom -Xms????M -Xmx????M -XX:+UseConcMarkSweepGC -XX:+DisableExplicitGC


Replace the ?s with the amount of memory you want to allocate to Tomcat.
There are also many articles on the web on Tomcat tuning.
#243
General Support / Re: SYS_AGENT_UNREACHABLE
January 25, 2016, 02:38:55 PM
Quote from: Nomis on January 25, 2016, 02:22:45 PM
Yes, "DebugLevel = 6".
You log file shows

[25-Jan-2016 11:52:02.347] [INFO ] Debug level set to 0
#244
Quote from: ndaami on January 25, 2016, 02:29:52 PM
Hi Victor,

Can you give us more details about -Xms and -Xmx options  and how/where can we change it ?
They need to be set for Tomcat.
You need to pass -Xms and -Xmx startup parameters to the JVM.

How to set them differs depending on how you installed Tomcat.
Depending on your Tomcat packaging, you need to set those in the Tomcat startup script (usually '/etc/init.d/tomcat8' or similiar).
For some distributions you can however modify '/etc/default/tomcat8' where those parameters are kept.

I suggest looking at the documentation and finding out how your package sets the 'JAVA_OPTS' Tomcat parameters.
#245
General Support / Re: SYS_AGENT_UNREACHABLE
January 25, 2016, 02:17:53 PM
Did you set "DebugLevel = 6"?
#246
This seems like a bug, its also reported here:
https://dev.raden.solutions/issues/1128
#247
General Support / Re: SYS_AGENT_UNREACHABLE
January 25, 2016, 12:48:28 PM
You need a file path, if you give it just directory, it will of course fail to start.

Use for example:
"LogFile = C:\Program\NetXMS\etc\nxagentd.log"

Then restart the Agent service to apply that change.
#248
Here is general info on how to setup emails (I guess you already have that working tho):
https://wiki.netxms.org/wiki/How_to_send_e-mail_notification_when_disk_space_is_low

In the "Send E-Mail" action, you have access to all parameters of the event.
See this link for how they are formatted:
https://wiki.netxms.org/wiki/UM:Event_Processing#Macros_for_Event_Processing

Threshold violation events are all modeled by the "SYS_THRESHOLD_REACHED" event.
Which means that %4 is the current value of the DCI.
For list of all parameters and what numbers they are see the "SYS_THRESHOLD_REACHED" event template (Configuration > Event configuration).
#249
You can use a transformation script like this:

foundMatch = $1 ~= "Juniper Networks, Inc\. .* kernel (.*), Build date: .*";

return foundMatch ? $1 : "Unknown";


Then set threshold on the DCI to "Operation" "!= : not equal to" and the version you want to have on your devices into "Value".

This will generate SYS_THRESHOLD_REACHED events (by default, feel free to generate different event if you want) when the version is invalid.
Handle the event in EPP as you wish to generate Alarms / notifications (by default it will already create an Alarm in NetXMS).
#250
What happens is that sys_node_down events are generated when nodes go down which are behind a proxy, but those events are correlated to the proxy down event.
Since they are correlated, they dont enter EPP, and therefore will not create alarms (since EPP defines alarm creation).

It seems sys_node_up events are not correlated to the proxy up event, which sounds like correct behavior to me.
After all, how long after proxy comes back up should you correlate sys_node_up event to the proxy up event, for which nodes, etc.?
It opens up many weird behaviors and edge cases - it would be really hard to know (if not impossible) which sys_node_up should and should not be correlated.

As for if there was any changes in behavior from 2.0-RC1 to 2.0.1, I dont know.
I personally dont generate sms/emails for when things return back to "good" state, only when they go down.

And why it behaves differently for your before upgrade and after upgrade, I also dont know :(
#251
Events and alarms are 2 different things.

Check the event log to see if there indeed are node up event for the nodes or not.
If so, check how your EPP is handling those events.
#252
Just a bit more info on this:

When a node is put into the maintenance mode, all new events generated for that node are correlated to the "Node entered maintenance mode" event.
So any new events (after node is put into maintenance) do not actually enter EPP at all (since correlated events do not enter EPP).

When you double click on the "Node entered maintenance mode" alarm in the Alarm Browser, you can see all events that were correlated to the maintenance event.
#253
General Support / Re: DCI question
January 22, 2016, 04:39:45 AM
Create a script DCI and collect the combined value of the DCIs into the script DCI.

Then make the threshold on that DCI.

Sample script attached below.
Save it to script library and call it from the script DCI.

val1 = GetDCIValueByDescription($node, "DCI1 description");
val2 = GetDCIValueByDescription($node, "DCI2 description");
val3 = GetDCIValueByDescription($node, "DCI3 description");
val4 = GetDCIValueByDescription($node, "DCI4 description");

if (val1 == null || val2 == null || val3 == null || val4 == null)
  return 0;

return val1 + val2 + val3 + val4;
#254
General Support / Re: NXPUSH
January 20, 2016, 02:57:39 AM
nxapush is simply newer - on newer versions nxpush is not present anymore (specifically when installing from netxms apt repo).
#255
General Support / Re: NXPUSH
January 20, 2016, 02:18:10 AM
I suggest you NXAPUSH to a DCI.

You need to "Disable status polling" in node's "Polling" properties
Only setting "Disable usage of ICMP pings for status polling" is not enought.

After that, you can then set the DCI to "Use this DCI for node status calculation".
Its in the "Other options" of the DCI.

Please be aware that this combination might not be good - since you are relying on the script A LOT.
If your script dies, or whatever else happens to it, your node down detection will not work (since the push-type DCI will not get updated with new data, and therefore node status will not be re-calculated).
So if someone does "pkill thescript.sh", your monitoring will be dead.