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 - Alex Kirhenshtein

#631
Альтернативный вариант:if ($1 match "AC voltage: ([0-9]+) V") {
   return $1; // тут будет значение группы ([0-9]+)
}
return $1;

#632
Баг выглядит знакомым – обновите сервер на M4, скорее всего поможет.
#633
Сервер не должен падать. Включите пожалуйста сохранение dump файлов (https://www.netxms.org/documentation/adminguide/troubleshooting.html#enable-crash-dump-generation) и пришлите их на [email protected].

Quote from: parovoZZ on May 06, 2015, 01:37:31 PM
А из таблицы-то как получить значения? Вставляю колонки, прописываю OID и сервер уходит в ошибку. Перезапускаю службу и все изменения исчезают.
#634
I suggest you to change it from ExternalParameter to ExternalParameterProvider, this way data collection will work faster.
Detailed description: https://wiki.netxms.org/wiki/ExternalParametersProvider
#635
You can try to create ps1 script like this:

add-pssnapin Microsoft.Exchange.Management.PowerShell.E2010
Get-MailboxDatabaseCopyStatus | fl -Property Status
#636
General Support / Re: Dashboard theme
May 05, 2015, 12:24:22 PM
Not at the moment, but I like the idea. Registered in bug tracker: https://dev.raden.solutions/issues/820
#637
You can automate it a bit using nxshell (which is python internally) – generate CSV or xlsx file.
However, if you want fully automated reports – you need to use some kind of reporting engine, either built-in Jasper or some external solution.

Sample script which export summary table into csv file:#!/usr/bin/env python
# -*- coding: utf-8 -*-

import csv, sys

menuPath = "Table1" # Table's "Menu Path"
baseObjectId = 2 # Infrastructure Services
outputFile = 'test.csv'

for table in session.listDciSummaryTables():
    if table.getMenuPath() == menuPath:
        result = session.queryDciSummaryTable(table.getId(), baseObjectId)
        if result:
            with open(outputFile, 'w') as f:
                w = csv.writer(f, dialect='excel')
                columns = []
                for c in result.getColumns():
                    columns.append(c.getDisplayName())
                w.writerow(columns) # Header

                for row in result.getAllRows():
                    cells = []
                    for i in range(0, row.size()):
                        cells.append(row.get(i).getValue())
                    w.writerow(cells)
#638
Announcements / Re: NetXMS 2.0-M4 released
April 30, 2015, 09:57:03 PM
Hello.

That's a bug in nxshell. I've put fixed version on the web, please download it again (https://www.netxms.org/download/nxshell-2.0-M4.jar).

Quote from: jhuliagraziella on April 30, 2015, 09:00:46 PM
Hi!
I'm having a problem after updating to version M4.
I started making some scripts to add and configure nodes in python and tested them using version M2, they worked perfectly! But now they simply don't even run.
When I run this command:

java -Dnetxms.server=127.0.0.1 -Dnetxms.user=admin -jar nxshell-2.0-M4.jar script.py

I get the following error:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: No module named api

I verified my scripts and it looks everything is alright... :-\ What can I do about it?
#639
Announcements / IRC support channel [defunct]
April 24, 2015, 06:17:13 PM
Hello.

Quite a lot of users suggested IRC support channel for NetXMS and we want to give it a go.
Join #netxms on freenode.

List of servers: https://freenode.net/irc_servers.shtml
#640
Общие вопросы / Re: 2.0-M3 nxhttpd
April 23, 2015, 05:56:35 PM
nxhttpd был выкинут много лет назад, сейчас WebUI только на джаве.

commit 28e36118c3320b67e119cecab8fd5c324dbc9fef
Author: Alex Kirhenshtein <[email protected]>
Date:   Wed May 23 13:17:19 2012 +0000

    nxhttpd traces removed
#641
В NetXMS надо настроить маппинг между SNMP traps и Events.
В любом случае, трапы контроллер будет присылать только когда что-то сломается, для получения текущего состояния надо делать скрипт на основе MegaCli
#643
if ($1 =~ "[:/]") {
  value = AgentReadParameter($node, "FileSystem.Total(" . $1 . ")")
  return (value > 5*1024*1024*1024 && value < 1*1024*1024*1024*1024);
}
return false;


Quote from: sharpspro on April 21, 2015, 09:40:10 PM
Guys,

I'm looking to create a script that will only show drives within a certain size range. For example only show drives that are between 500Gb and 1,000GB or 1,000TB and 1,500GB.

The reason being is that i want to setup thresholds differently on drives. Smaller drives i would like to have a higher percentage free than huge drives. The bigger the drive gets the lower i want the percentage free to alert on the threshold.
#644
I'd suggest to create feature request in our bug tracker (https://dev.raden.solutinos/).

Support for System.InstalledProducts: it would speed things up if you can provide command(s) for querying list of installed packages.
Right we have following columns in the table (some of them can be empty, of course): NAME, VERSION, VENDOR, DATE, URL, DESCRIPTION

Another option – you can try to add it yourself, it's quite easy (check function H_InstalledProducts in Linux subagent):
http://git.netxms.org/public/netxms.git/blob/refs/heads/develop:/src/agent/subagents/linux/packages.cpp?js=1#l26 (actual code)
http://git.netxms.org/public/netxms.git/blob/refs/heads/develop:/src/agent/subagents/linux/linux.cpp?js=1#l485 (table registration)
#645
Hello.

Tables are fully supported by the agent ("FileSystem.Volumes", "System.InstalledProducts", "System.Processes", etc.).
However, as you correctly noted – table can't be configured as external parameter at the moment (only ExternalParameter, ExternalParameterProvider, and ExternalList).
This is on our TODO list, and hopefully it will make into 2.0 release.