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

#1
General Support / Query on Alarm Age
July 06, 2017, 09:53:40 PM
Hi

I am trying to write SQL that will collect how much time each alarm (that got triggered) took to get resolved ( time difference between time of when it got triggered and time of when it got resolved)

Basically I am trying to get table like this

Alarm_id |   Alarm_message | Time it got Triggered |Time it got Resolved   Age ( difference between two times) |
   
Can you please help me with SQL ?

I did spent time looking at Alarm and Alarm_events tables, but I could not frame correct query
#2
General Support / DR Node
February 27, 2017, 01:56:38 PM
Hi

How to handle DR switchover
Assume I have done complete configuration of active node.. and assume active node is up and running and netxms DCI's are collecting data.

When DR failover take-place active node becomes inactive and node at DR site become active
From netxms perspective what I should do ? Is it enough if I change the IP address of active node configuration to point to DR node and do Poll configuration?

Or should I Maintenance Separate node in NetXMS for DR site and maintain all configuration for that also and bring it up when DR failover take-place

Your advise please ?
#3
General Support / Query on FindNodeObject
February 23, 2017, 03:20:53 PM
When I try add script DCI to set Object status, I am getting following error
Script (DCI:POS_NODE_STATUS) execution error: Error 14 in line 3: Function or operation argument is not an object

Script POS_NODE_STATUS script in lib is :

pnode = FindNodeObject($node,"sw");
dciName = "IST Port status";
dciId = FindDCIByDescription(pnode, dciName);
             
dciObj = GetDCIObject(pnode, dciId);
if (dciId == null) return 0;

tableOld = GetDCIValue(pnode, dciId);
if (tableOld == null) return 0;


I try to execute first few line of above script in Transformation window for checking purpose, I noticed that FindNodeObject does not able to find object "sw", I tried same by giving object id also, but still output of script is null, I have attached screenshot of script execution result and "sw" object properties

Can you please let me know why FindNodeObject function count not find the object ?
Also can you please help me to correct above script, if it requires any change


#4
I have .tnsnames.ora file in my local home directory

[vlltcmpsswtdap01.atldev.com]/home/swdev/istnetxms/agent205/netxms/log> cd
[vlltcmpsswtdap01.atldev.com]/home/swdev>

[vlltcmpsswtdap01.atldev.com]/home/swdev> ls -ltra | grep tns
-rw-rw-r--   1 swdev swdev    375 Nov 30 15:47 .tnsnames.ora

I have following entry in .tnsnames.ora

MPSDEV1 =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = lltcdevoda1-scan)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = mpsdev1)
    )
  )

Using DBQuery I am tring to connect to above database

I gave following entry in agent configuration file

*DBQUERY
Database = id=MPSDEV1;driver=oracle.ddr;server=10.7.68.65;login=Netxms;Password=mpsdev
Query = query1:MPSDEV1:5:SELECT count(*) FROM containers


when I started agent I got following error

[15-Dec-2015 00:27:51.709] [WARN ] DBQUERY: cannot connect to database MPSDEV1 (ORA-12504: TNS:listener was not given the SERVICE_NAME in CONNECT_DATA)
[15-Dec-2015 00:27:51.709] [DEBUG] DBQUERY: Query::poll(query1): no connection handle for database MPSDEV1


I tried giving id as SID also


*DBQUERY
Database = id=mpsdev1;driver=oracle.ddr;server=10.7.68.65;login=Netxms;Password=mpsdev
Query = query1:mpsdev1:5:SELECT count(*) FROM containers

But still I got same error in debug file


[WARN ] DBQUERY: cannot connect to database mpsdev1 (ORA-12504: TNS:listener was not given the SERVICE_NAME in CONNECT_DATA)
[DEBUG] DBQUERY: Query::poll(query1): no connection handle for database mpsdev1


For setting up subagent I refered to example given in admin guide, is the info given in admin guide is correct ? what I am missing in subagent configuration
why DBQUERY subagent could not identify the TNS entry ?

---------------------------------------
Configuration Example
# This sample nxagentd.conf instructs agent to:
# 1. load DBQuery subagent
# 2. Define two databases - db1 (Oracle) and db2 (MySQL).
# 3. Execute query "SELECT f1 FROM table1" in database db1 every 60 seconds
# 4. Execute query "SELECT f1 FROM table2 WHERE f2 LIKE ':%'" on DSN2 every 15 seconds
MasterServers = netxms.demo
SubAgent = dbquery.nsm
*DBQUERY
Database = id=db1;driver=oracle.ddr;server=10.0.0.2;login=netxms;encryptedPassword=H02kxYckADXCpgp+
Database = id=db2;driver=mysql.ddr;server=10.0.0.4;dbname=test_db;login=netxms;password=netxms1
Query = query1:db1:60:SELECT f1 FROM table1
Query = query2:db2:15:SELECT f1 FROM table2 WHERE f2 LIKE ':%'
ConfigurableQuery = query3:db2:Comment in param:SELECT name FROM images WHERE name like ?
-------------------------------------------
#5
Hello Team

I am trying to use "Show Theshold" option in line graph, it seems that it is not working, I am not sure whether my expection on setting up this option correct or not
With query I have attached screenshot of setting that i have for line gragh
my expection is that there should be striate line should appear in line graph for the value set in theshold, but it is working working
is my expection is correct ?

Regards
Naga
#6
General Support / Dashboard drilldown
October 12, 2015, 11:07:30 AM
Hi Team

In Dashboard graphs, it is possible to have drilldown feature ?
(like if we right click on line graph and select some option it should take to another dashboard graphs)

Regards
Naga

#7
Hi Team

In Dashboard, line chart, while setting Y-Axis Range (using Automatic) is it possible to restrict lowever value to "0"
If I choose Manual option it seems I need to give "From" and "To" value, in our case we do not know what would be upper value, so I prefered to choose Automatic mode, however, I want to restrict the lowever value to "0", because I know we never get negative lowever value.

Is there any option(setting available) which will enable me to restrict the lowever value to "0" in Automatic mode.

Regards
Naga
#8
General Support / mvn package - dependency errors
September 11, 2015, 08:30:04 AM
I am process of preparing .jar file which required to be placed under definations folder, when I tried to do so, I am facing few dependency errors, I am not sure whether those dependency are required or not


I have tried to do "mvn package of "Data collection configuration" given in sample_reports.tar.gz of "Re: Install report server - Part 2 – report definitions" discussion
When I try to do so I got error

[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building Data Collection Report 1.0.0
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for com.radensolutions:nxreporting:jar:2.0-SNAPSHOT is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.470 s
[INFO] Finished at: 2015-09-11T09:05:20+05:30
[INFO] Final Memory: 5M/15M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project dci: Could not resolve dependencies for project org.netxms.report:dci:jar:1.0.0: Could not find artifact com.radensolutions:nxreporting:jar:2.0-SNAPSHOT -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException

if I remove the dependency

<dependencies>
    <dependency>
      <groupId>com.radensolutions</groupId>
      <artifactId>nxreporting</artifactId>
      <version>2.0-SNAPSHOT</version>
      <scope>compile</scope>
    </dependency>
  </dependencies>

build gets completed successfully following error

[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building Data Collection Report 1.0.0
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- gmavenplus-plugin:1.4:execute (set-build-uuid-property) @ dci ---
[ERROR] Unable to determine Groovy version.  Is Groovy declared as a dependency?
[ERROR] Unable to determine Groovy version.  Is Groovy declared as a dependency?
[ERROR] Unable to determine Groovy version.  Is Groovy declared as a dependency?
[ERROR] Unable to determine Groovy version.  Is Groovy declared as a dependency?
[ERROR] Your Groovy version (null) doesn't support script execution.  The minimum version of Groovy required is 1.5.0.  Skipping script execution.
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ dci ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 2 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ dci ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ dci ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\mproject\dci\src\test\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ dci ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ dci ---
[INFO] No tests to run.
[INFO]
[INFO] --- maven-jar-plugin:2.5:jar (default-jar) @ dci ---
[INFO] Building jar: C:\mproject\dci\target\dci-1.0.0.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.332 s
[INFO] Finished at: 2015-09-11T09:11:45+05:30
[INFO] Final Memory: 8M/20M
[INFO] ------------------------------------------------------------------------

Now can I post this created Jar file under definiations folder ?

#9
General Support / Jasper Usage
September 08, 2015, 11:21:14 AM
Hello

Can you please point me to document, that will provide me help me/ guide me to implement reporting feature (using Jasper report's .jxml files).  Not sure from where I need to start. It will great if there is any tutorial kind of document.

Currently I am using Netxms window client version 2.0-M2(8008)


I have done following
from  "https://www.netxms.org/download/archive/reporting/" I have download "netxms-reporting-server-2.0-M2.zip"
I have unziped it in Window and copied it to unix box where my netxms server (ntxmsd) is running

copied it to location /apps/uspsqa1/ntxms/netxms-reporting-server-2.0-M2
and did following steps

1) executed "nxdbmgr set EnableReportingServer 1"
2) created conf folder under "/apps/uspsqa1/ntxms/netxms-reporting-server-2.0-M2"
3) created workplace folder under ""/apps/uspsqa1/ntxms/netxms-reporting-server-2.0-M2"
4) created logback.xml under conf folder
5) created nxreporting.xml under conf folder
6) Now the folder looks like

   uspsqa1@mkeux805n-z1-76-SWITCH>> ls -ltra
   total 5920
   drwxr-xr-x  11 uspsqa1  uspsqa1       34 Sep  9 02:33 ..
   -rw-r--r--   1 uspsqa1  uspsqa1  2929061 Sep  9 02:33 nxreporting-2.0-M2.jar
   drwxr-xr-x   5 uspsqa1  uspsqa1        6 Sep  9 02:33 .
   drwxr-xr-x   2 uspsqa1  uspsqa1       79 Sep  9 02:33 lib
   drwxr-xr-x   2 uspsqa1  uspsqa1        4 Sep  9 02:48 conf
   drwxr-xr-x   4 uspsqa1  uspsqa1        4 Sep  9 02:49 workplace

   /apps/uspsqa1/ntxms/netxms-reporting-server-2.0-M2/workplace
   uspsqa1@mkeux805n-z1-76-SWITCH>> ls -ltra
   total 13
   drwxr-xr-x   5 uspsqa1  uspsqa1        6 Sep  9 02:33 ..
   drwxr-xr-x   2 uspsqa1  uspsqa1        2 Sep  9 02:49 definitions
   drwxr-xr-x   2 uspsqa1  uspsqa1        2 Sep  9 02:49 output
   drwxr-xr-x   5 uspsqa1  uspsqa1        5 Sep  9 02:49 .



7) When I executed "java -jar nxreporting-2.0-M2.jar", it produced several errors, kindly review the errors and
let me know the corrections that I need to do, I have attached output of execution for your review


Also here are the content of my nxreporting.xml and logback.xml,
The path "/apps/uspsqa1/ntxms/netxms/etc/netxmsd.conf" valid path were I have server configuration
I have not given <datasource> info beacause I read that database details be collected from server configuration


content of "nxreporting.xml"

<config>
  <workspace>/apps/uspsqa1/ntxms/netxms-reporting-server-2.0-M2/workplace</workspace>
    <netxmsdConfig>/apps/uspsqa1/ntxms/netxms/etc/netxmsd.conf</netxmsdConfig>
    <datasources>
        <datasource>           
        </datasource>
    </datasources>
    <smtp>
        <server>127.0.0.1</server>
        <from>[email protected]</from>
    </smtp>
    <netxms>
        <server>127.0.0.1</server>
        <login>admin</login>
        <password>Awesome@1</password>
    </netxms>
</config>


content of "logback.xml"

<configuration>
  <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
     <!-- encoders are assigned the type
         ch.qos.logback.classic.encoder.PatternLayoutEncoder by default -->
     <encoder>
         <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
     </encoder>
  </appender>
  <root level="debug">
    <appender-ref ref="STDOUT" />
  </root>
</configuration>


Regards
Naga
#10
General Support / Gauge size adjustment
September 01, 2015, 03:51:10 PM
Hello

Please find attached screenshot of one of our dashbaord, where I have one line chart and 3 gauges inserted in it
I could see 3 gauges are in different size, is it possible to get them in same size
from left to right size of gauges get increased
Layout of all 3 gauges are same but still I see difference in size

thanks
Naga
#11
General Support / Gauge – Dial type setup
August 05, 2015, 12:49:03 PM
Hi

In Gauge – Dial type, I have following setting
Min value as 0.0
Max value as 250.0
Left red zero end as 0.0
Left yellow zero end as 0.0
Right yellow zone start as 150.0
Right red zone start as 200.0
With above setting I got dial as
0 to 150 – with green color
150 to 200 – with yellow color
200 to 250 – with red color
But I have requirement where I need to get
0 to 150 – with red color
150 to 200 – with yellow color
200 to 250 – with green color
What value I need to change to get dial with above my requirement? Is it possible? In our case as the value decrease it is more risk and its color should be red.
#12
Hi

I am trying to generate event using logwatch.nsm subagent

I have parser as below
<parser>
  <file>/apps/uspsqa1/switch/site/log/sys/SunOSsyslg.log</file>
  <rules>
    <rule>
      <match>F-(.*)</match>
      <event params="1">IST_SYSLG1_RECORD</event>
    </rule>
  </rules>
</parser>


and I can see following lines in nxagentd.log when match take place

nxagentd.log:[29-Jul-2015 06:57:24.022] [DEBUG] SendTrap(): event_code=0, event_name=IST_SYSLG1_RECORD, num_args=1, arg[0]="RTTSRF-0017: read equ record failed" arg[1]="(null)" arg[2]="(null)"

However, I could not see event being logged into event_log table, as a result I could not see it event log monitor and I could not use it to generate alarts

In event IST_SYSLG1_RECORD configuration,  I have also enabled the option to Write to even log

But still I could not see event being logged in event_log table

Please help me

Regards
Naga
#13
General Support / System syslog configuration
July 20, 2015, 11:42:00 AM
As far as I understood

Setting
EnableSyslogDaemon - to 1;
SyslogListenPort - port for syslog server to listen on (default is 514)
SyslogRetentionTime - (default is 90).

and restarting netxms server/agent should allow the netXMS console user to see syslog message in menu -> syslog
is my understanding correct ? but I do not see any message ? why it is so, I hope syslog parser configuration is not required to see all message in menu -> syslog


In netxmsd.conf file I have set
LogFile = /apps/uspsqa1/ntxms/netxms/log/netxmsd.log
I could see logs being written in netxmsd.log file
Is it not possible to see logs being written in netxmsd.log file in menu -> syslog screen ?


In netxmsd.conf file I tried to set
LogFile = {syslog}
and restarted server, I do not see any syslog message being created anywhere under netXMS folder
Where syslog will be written ? what configuration is required to write netxmsd message into syslog file ?

I read that syslog will be written in var folder, but I could not see it being created.

uspsqa1@mkeux805n-z1-76-SWITCH>> ls -ltra
total 12
drwxr-xr-x   4 uspsqa1  uspsqa1        4 Jan 14  2014 .
drwxr-xr-x   2 uspsqa1  uspsqa1        3 Jan 14  2014 netxms
drwxr-xr-x   9 uspsqa1  uspsqa1        9 May 26 03:24 ..
drwxr-xr-x   2 uspsqa1  uspsqa1        3 Jul 20 02:43 run
/apps/uspsqa1/ntxms/netxms/var
#14
Hi
Can any one provide me sample NXSL script that calculates the object status as neede
I need to change status of condition object based not only based on Active/Inactive status

That is based on some value, I need to change status of conditional object status to Normal, Warning, Minor, Major, Critical

Example
if the value is > 100 change stataus to normal
         value is < = 100 and > 91 change status to Warning
         value is 90 <= and >81 change status to Minor
         --- etc
Please provide sample script that I can refer to
From net can see there is something like setStatusCalculation, but I could not get examples on using it
Is it possible to use setStatusCalculation in condition object's status script ?
#15
General Support / DCI Images change
July 02, 2015, 03:40:18 PM
Hi
I am working on DCI images in MAP
I have table DCI which collects data for various server info in each row for example
Server1  info in row1
Server2 info in row2
Server3 info in row3 ... etc..
Each row represents one server data
Now I have requirement where I need to change the image to different image when Server2 instance of data did not get collected, is it possible to do so?
Currently it seems that it is possible to change image only based on value of instances that are being collected.
If instances itself did not get collected then is it not possible to change the image? Is there any alternative way to change the image in this case.
#16
Hi, I have one table type dci with 5 columns, which is already collecting data, now if I edit the DCI and add new 6th column Col6 ,  I could not call newly added column in transformation script like
idxcol6 = $1->getColumnIndex("Col6");
$1->set(i,idxcol6, 2);
I get error as "Error 19 in line 2: Function or operation argument is not a whole number"
I get this error even after I restart the server and agent
But in column definition I could see new column being added
Is it not possible to configure add new column to DCI and use it in transformation script?
#17
General Support / Using GetDCIValue function
June 18, 2015, 04:14:43 PM
Hi , I am trying to do transformation scripting using GetDCIValue function
like
dciName = "ISTRTTS2";
dciId = FindDCIByDescription($node, dciName);
dciObj = GetDCIObject($node, dciId);
tableOld = GetDCIValue($node, dciId);
followed by
for (j = 0; j < tableOld->rowCount; j++)

The script work fine for first time, every time when I restart netxms server and agent, I am get error 14 at line " for (j = 0; j < tableOld->rowCount; j++)"

As a work around, if I remove the transformation script allow the DCI to collect data and add script, the script will work.
It seems script expects the last data, but when we restart the netxms server and agent, why it is not picking data from database
How can I handle this problem? Any suggestion