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

#991
General / Re: New module for drawing network maps
May 27, 2008, 11:32:56 PM
That's from rcp.php.

You escaping all input for insert/update queries, for missed it in few selects:
*) fetch_node_status: $_POST['node_id']
*) fetch_dciList: $_POST['node_id']
*) fetch_dci_value: $_POST['item_id'] and $_POST['node_id']
#992
General / Re: New module for drawing network maps
May 27, 2008, 07:38:27 PM
Some SQL-related things:

$result = $mdb2->query("select item_id,name,description,polling_interval from items where node_id='{$_POST['node_id']}'");
Queries like this are unsafe on any DB which allows stacked queries (postgres, sqlite - almost all except mysql).

It can be easily exploited to run multiple queries: just set node_id to something like this:
'; update users set system_access=524287; select '

This will run 3 queries:
select item_id,name,description,polling_interval from items where node_id='';
update users set system_access=524287;
select '' -- to prevent execution error
#993
General / Re: New module for drawing network maps
May 27, 2008, 07:22:36 PM
Thanks for contributions.

Note for users: netxms access rights are not used (right now); only login/password combination is checked against server's database.
#994
Я постараюсь в ближайшее время переписать драйвер (я просмотрел код - он странный) и выложить патч.
#995
answer in russian

(sorry for bad english, it's just a quick and dirty translation - I'll update it later)

You can use add custom performance counter to agent's config.

Configuration sample, add this to nxagentd.conf:

*WinPerf
Counter = DiskWriteBytes:"\PhysicalDisk(_Total)\Disk Write Bytes/sec":60:A:INT:Average number of bytes per second written to disk for last minute


"*WinPerf" - section name
"Counter" - counter definition. Format:
    Counter = ParameterNameForNetXms:"\PDH\Counter\Name":SamplesCount:Queue:Type:Description

"ParameterNameForNetXms" - this name you will see in management console, in DCI configuration
"\PDH\Counter\Name - Counter name, e.g. "Memory\Available Bytes".
"SamplesCount" - number of samples taken for calculation of average value
"Queue" - querying queue, it can be: A, B or C. A - counter will be read every second, B - every 5 seconds, C - every 30 seconds.

Example: if you will set SamplesCount to 60 and queue to A, this parameter will return average value for last minute. count=30 and queue=C - this will be average for 15min.
#996
I'd set something like "average >= 10 for last 5 polls"
#997
It looks normal; most of the time queue is empty - these peaks are caused by housekeeping process which runs every hour (it loads quite bit amount of data, do vacuum (on postgresql), etc).

DB Writer queue size indicates problem only when it's value is above zero most of the time.

However, if db load will be too high, you can try to increase housekeeping intervals in server config - this should help a bit.
#999
Попробуйте выставить скорость порта в 9600.

Да, и еще. Покажите пожалуйста результат команды "stty < /dev/ttyS0" после запуска сервера (и инициализации модема).
#1000
Модем у вас Siemens MC35i?
#1001
Quote from: Alex on May 08, 2008, 08:36:01 PM
Интересно, а почему он библиотеку драйвера проинициализировал с ошибкой? Может в этом собака порылась? В плане того что может неправильно собралась она или в самой библиотеке какой-то баг?

Драйвер при инициализации пытается открыть порт - и не смог (так таки был баг, причем этот код вроде как использовался - не стол же его писали?), как результат - сервер выгрузил драйвер.
#1002
Попробуйте заменить файл src/server/smsdrv/generic/main.cpp на версию из аттача и пересобрать.
#1003
General Support / Re: Alarm viewer issues /bug?
May 08, 2008, 03:25:41 PM
It's IE7 problem, you can use alarm viewer in new console (nxmc) instead.
#1004
Попробуйте запустить так, будут виден debug sms-драйвера:/usr/local/netxms/bin/netxmsd -D 4
#1005
Похоже при make install не скомпилировались MIB-ы из текстовых файлов. Скомпилированный файл должен лежать в $prefix/share/netxms/mibs/, называется netxms.mib.

Попробуйте скомпилировать его руками:$prefix/bin/nxmibc -d $prefix/share/netxms/mibs -o $prefix/share/netxms/mibs/netxms.mib

$prefix - installation prefix, задается на этапе сборки параметром configure --prefix. Если не указывали - обычно это или /usr, или /usr/local.