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

#1
Feature Requests / Re: NXSL improvements
March 18, 2010, 04:27:08 PM
Victor, thank you for your quick reply and willingness to improve the NXSL flexibility.

Quote from: Victor Kirhenshtein on March 18, 2010, 10:23:36 AM
Quote from: borislavl on March 17, 2010, 09:07:06 PM
3. Actions to be able to return a value(response from the command) to a specified DCI.
How this is different from DCI with external parameter as a source?
The differences are that the External Parameter can be attached to a DCI (collected on a period), but not to the event processing policy. If trying to create management workflow in NXSL - it is needed on some events to execute action, which result to trigger a second event and action on the local server. On the Linux servers this can be done with 2 nested nxpush executions (the result from the first nxpush is being pushed back to the local server from the second nxpush), but on the Windows servers this become complicated, because of the restrictions of the Win cmd shell.

Quote from: Victor Kirhenshtein on March 18, 2010, 10:23:36 AM
Quote from: borislavl on March 17, 2010, 09:07:06 PM
4. Or to call action from NXSL and receive/not receive value as response
I'm not sure that this is needed in DCI transformation and event filtering scripts. Main concern here is performance - for example, if event filtering script calls external action and waits for it's completion, it potentially could block event processing for significant amount of time.
I understand your concerns here, I was looking for such functionality in the scripts library, so when one action with parameter %[script] is executed - to be possible to execute another action before it and pass the result to the main action. Or based on the logic in the script to execute one or more actions.
At the moment if the logic is straight forward - this can be done with multiple lines in the Event Processing Policy, different scripts which return 1 or 0 (execute/not execute) and different action on each line.
Or one action which calls a script in the OS shell and there nxget and nxpush to be used as communication with the variables (DCI).

Quote from: Victor Kirhenshtein on March 18, 2010, 10:23:36 AM
Quote from: borislavl on March 17, 2010, 09:07:06 PM
5. From NXSL to be possible to set DCI values (activating their Thresholds as configured)
Could be implemented, but probably for "push" DCIs only (I mean allow to set value only for push DCIs).
This would be great. Even in "push" DCIs - it will be useful.
At the moment the alternative is to do actions which are calling the shell command nxpush, but if this can be done direct from the script - it will be much easier.
#2
Feature Requests / Re: NXSL improvements
March 17, 2010, 09:07:06 PM
Hi Victor,

Here as resume are some NetXMS feature requests, which will improve the management functionality to a point where almost everything can be accomplished using the NXSL:

1. Export for the NetXMS actions, event processing rules and script library
2. Or backup of the entire server configuration
3. Actions to be able to return a value(response from the command) to a specified DCI.
4. Or to call action from NXSL and receive/not receive value as response
5. From NXSL to be possible to set DCI values (activating their Thresholds as configured)
6. Updated version for the DRBD subagent

What do you think?


Thank you,
Boris
#3
General Support / Re: NXSL scripting
March 17, 2010, 07:45:40 PM
Hi Victor,

How we can escape the quotation marks in the Agent configuration file?
i.e. if quotation marks are used like
ExternalParameter = A1_CONN_S2S_A2:c:\netxms\bin\nxpush 192.168.2.2 -u pushuser -P pushpass -v A2:A2_INCOMING_ACK_S2S_A1=1 | find /c "Done."
(on windows server) in the agent configuration file the ExternalParameter does not work because of the quotation marks. I've tried with backslash "\", but not successful.


Thank you,
Boris
#4
General Support / DCI error flag
March 10, 2010, 03:02:33 AM
Hi Victor,

Thanks for the effort for creating such functionality as DCI object – errorCount.
I do appreciate that it is really professional to not make significant changes to the code without the proper testing after that.
Is it possible the DCI object to have – errorFlag which can be 1 or 0, if the last polled DCI Is error, and the next poll is successful the errorFlag to be set back to 0?
This way the DCI value can be trusted or no from the NXSL.

Thank you,
Boris
#5
General Support / NXSL scripting
March 05, 2010, 03:21:47 AM
Hi Victor,

What is the escape symbol for NXSL?
I.e to escape quotation mark ". I've tryied backslash \, but didn't work.


Thank you,
Boris
#6
Hi Victor,

Could you please update the NetXMS - so when there is a "data collection error" - this value to be recorded to the DCI where the error happens?
At the moment if i.e. checking connection on specific interval and the last value was that there was connection, but after that there is data collection error - the DCI remains the same old value - that there is connection and just stop updating. If you are using the NXSL for checking this DCI it will continue accepting the old value before the error (like everything is ok).


Thank you,
Boris
#7
Hi Victor,

In my case I have to manage only 3 nodes, so I've set the StatusPollingInterval to 10 seconds.

Is it difficult to be developed - when there is "data collection error" - this value to be recorded to the DCI table (database)?
I.e. empty string "" or something suitable for all data types. In this case when needed the connection can be checked from the NXSL.


Thank you,
Boris
#8
General Support / Agents monitoring
March 02, 2010, 06:05:59 PM
Hi Victor,

Thank you for the quick response and understanding.

I need to check the availability of 3 agents (on 3 servers) every 5 sec (or less).
Using the Internal->AgentStatus check the values are checked every 60 seconds, doesn't matter of the DCI polling interval (i.e. 5 seconds).
Is this controlled by the Server configuration -> StatusPollingInterval and if I set it from 60 to 5 seconds will this affect the performance?

I was trying a workaround - using Agent.Uptime, every 5 seconds - but in this case when there is no connection with the agent there are no new values (neighter errors) on which I can attach a Threshold that the connection is broken (may be because of configuration).
Then I've created an External parameter with nxget to the agent, so when there is no connection with the agent it returns a string "Cannot establish connection...", but if the local agent stops, there is no error returned and all the External parameters just stop being collected.

What is the easiest way to monitor the agents availability in a short interval (5 seconds or less)?


Best Regards,
Boris
#9
General Support / great news
February 26, 2010, 06:33:25 AM
Hi Victor,

These are great news :).

I already install the new version - no issues with the updgrade from the previous version.

The function GetDCIObject looks very helpful.

Could you please tell how to receive the DCI timestamp using it?

I was trying a script like this:

sub main()
{
testobject = GetDCIObject($node, FindDCIByDescription($node, "DCI_Description_1"));
return testobject->timestamp;
}

It was working fine with the object members id, name, description and status, but I was not able to find how to access the DCI timestamp?

Are there other members of the DCI object?



Thank you for the great work,
Boris


#10
General Support / Re: Action to return value
February 22, 2010, 06:43:08 AM
Hi Victor,

Thank you for your answers and eager to make NetXMS better and better. It will be great if we can use the timestamp of collected DCI. I continue in configuring the solution and new questions rise up :).

1. Is it possible when we have multiple Thresholds i.e. for values 1, 2, 3, .. N, to run only one Event in case that the Condition is true and NOT having to run an Event when the Condition is false (i.e. 2, 3, .. N)?
In other words to have a Threshold with only one Event (true) and not having Event for false (or having None in case of false)?

2. In the FindDCIByDescription($node, "DCI_Desc") can we specify the node (other than the current one)?

3. How the option "Proxy node" in the DCI works? If I select other node on which there is agent and server, the data collection stops. Is the idea to receive values from the NetXMS agent on the proxy node or it is used as proxy but you are receiving the values from the node for which the DCI is set?

4. Is nxget the only way for collecting values from other nodes' agents?

5. When using ExternalParameter which returns a string – it is captured to the first interval " ". Is there a way the entire string to be captured and to be specified what length to be returned?


Thanks,
Boris
#11
General Support / Re: Action to return value
February 06, 2010, 02:33:48 AM
Hi Victor,

Thank you for your quick and accurate answers.

In the same configuration (3 NetXMS servers and 3 agents), I need to monitor the 2 way connection/availability with the NetXMS servers and agents:
- I'm checking the connection with the remote Agents, collecting their uptime every 5 seconds.
- For checking the connection availability to the remote NetXMS server, I'm using the shell command nxpush (to the remote server), executed every 5 seconds as a Parameter on the local agent and check the return value - if it is "" (empty string) the server is alive, if it is "Cannot connect..." there is connection/server issue.  At the same time at the receiving server I'm trying to check if I'm receiving properly the pushed values - i.e. if the pushed timestamp is older than 10 seconds - there is issue with the 2 way connectivity.

Few related questions:
1.Is there a better way for monitoring the 2 way connection between the NetXMS servers?
2.Is there performance issue if events (logging unchecked) are generated on short interval (i.e. 5 sec)?
3.What is the code in NXSL to access the last DCI?
4.What is the code to access the last DCI collected timestamp?
5.In DCI Transformation, using NXSL, can we use other other DCI value and based on both to return value (i.e. true or false), which to be used in the thresholds (to generate event).


Thank you,
Boris
#12
General Support / Re: Action to return value
January 29, 2010, 08:38:35 PM
Hi Victor,

Thank you for your dedication to NetXMS - it is really cool and useful.

Please don't underestimate your product  :).
Regarding my question 2 - I really needed to close the cycle in receiving data > event > action > receiving data. So tricking around with the Linux commands and the NetXMS shell commands I had success in case of event -> action > to receive data, using as action (in nxagentd.conf) the following:

ActionShellExec = Check_A1_A2_Agent_Status:/opt/netxms/bin/nxpush 192.168.1.10 -u pushuser -P pushpass  A1.test.com:A1_A2_Agent_Status=`/opt/netxms/bin/nxget 192.168.1.12 Agent.Uptime`

#These are 2 commands in 1 line - checking if the agent on A1 has connection with A2 in case that A3 (192.168.1.10) does not have direct connection with A2 and returns the response to a Push DCI (based on which we can generate other events and actions)

What I'm trying to do is to automate the management between 3 servers depending on different situations.
You will see what a big fan of your work am I when tell you what I did :) :
I've installed on each of the 3 servers a NetXMS server and an agent (each agent communicates with every one of the 3 servers). In total for the 3 servers - there are 3 NetXMS servers and 3 agents. In this way based on the different situations (network or server issues) the 3 servers can take decisions and actions.

The idea of pushing events between the servers is very good and helpful. Is there a other way to transfer values?
Is the Event processing the only way of setting the Situation attributes?
Can we for example do something like: s->status = "updated" (s - situation)?
Can we see the current Situation attribute state in NetXMS console?
Is there a way to change Custom Atributes?
Can we send parameters to the actions?
Can we write DCI value to a file (using actions)?


Thank you,
Boris
#13
General Support / Action to return value
January 27, 2010, 10:35:21 PM
Hello,

Last week I've installed NetXMS, and did some tests with NXSL.

There are few questions to which I can't find the answer yet:
1. Is it possible when on: data collection > treshold > event > action > to receive the response from the action (i.e. some script has been executed and it's result, similar to "ExternalParameter")?
2. Is it possible to create action which initiates data collection (otherwise the DCI is setup for 1 hour)?
3. Using function in NXSL i.e. GetDCIValue, the last collected value is returned, is there a function/way so the DCI has been polled at the moment (realtime) of function execution?
4. I've seen functions i.e. GetCustomAttribute and GetSituationAttribute, is there a way how we can set these values from NXSL?
5. Is it possible to execute actions from NSXL?


Thank you,
Boris