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

#1126
На FreeBSD этих параметров пока нету. Можно как временное решение (пока мы всёж не допишем) использовать внешние скрипты.

Нечто вроде такого в nxagentd.conf:
ExternalParameter = Net.Interface.BytesIn(*):/usr/bin/somecommand in $1 | grep ... | awk '{ ...}'
ExternalParameter = Net.Interface.BytesOut(*):/usr/bin/somecommand out $1 | grep ... | awk '{ ...}'


Вот таблица поддержки различных фич на разных платформах
#1127
1) Попробуйте принудительно выставить LD_LIBRARY_PATH (или прописать каталог с libnetxmsw.so.0 в /etc/ld.so.conf и запустить ldconfig)

2) Увы, но нет. Этот веб-интерфейс, он больше похож на proof of concept (причем не очень удачный), чем на production версию — мы забросили эту ветку и собираемся писать новый.
#1128
Quote from: Dmitry on March 22, 2008, 09:45:44 AM
Меня бы вполне устроило снятие информации с агентов двумя серверами. Это возможно? Насколько я понял, в конфиге агента прописывается единственный сервер NetXMS. Скажите уже мне, что я не прав :)

Да, это возможно — в конфиге можно прописать несколько адресов через запятую.
Мало того, один сервер может быть прописан в "Servers", что подзволяет ему только собирать данные, а второй — в ControlServers или MasterServers, что позволит ему еще и редактировать удаленно конфиг / апгрейдить агента.
#1129
General Support / Re: Oracle Login Check
March 21, 2008, 03:43:03 PM
Quote from: prutser on March 21, 2008, 01:38:40 PM
However maybe 1 question. It seems that when i want to edit the etc/nxagentd.conf, to reflect the changes, I hav to restart the agent service. Is there another way to reflect the changes in the config file?

No, agent should be restarted to load updated config (at least now). However, if you edit agent's config from management console (right click on node -> edit agent configuration), there are an options to "save" or "save and restart agent". To use this feature agent should have write access to config file and server's IP should be in ControlServers or MasterServers section of agent's config.
#1130
1) wxrc входит в пакет wx-common
2) static файлы для nxhttp ставятся в $(pkgdatadir)/nxhttpd, DocumentRoot должен быть /usr/local/share/netxms/nxhttpd. Как  вариант — поискать файл netxms.css, скажем — каталог, в котором от лежит должен быть указан как DocumentRoot.

3) похоже в rc поломал карты — будем смотреть, оно не должно падать.
А минидампа не сохранилось? Обычно в %TEMP% пишется (полный путь видно в окне с ошибкой, когда консоль падает).
#1131
General Support / Re: Oracle Login Check
March 20, 2008, 05:02:22 PM
Check PATH and environment variables required by oracle client, netxms agent usually running under separate account with different settings.
Try to set all required in that bat file (e.g. PATH to sqlplus, ORACLE_HOME, etc)

You can try something like this:
echo @echo off > run.cmd && for /F "delims=" %a in ('set') do @echo set %a >> run.cmd

This should produce "run.cmd" with multiple "set ..." command. Just append sqlplus call at the end and try to run it using agent.
#1132
General Support / Re: Oracle Login Check
March 19, 2008, 10:41:01 PM
You can add custom parameter on agent which calls sqlplus (or some script around it)

Add to nxagentd.conf:

ExternalParameterShellExec = Oracle.FakeLogin:sqlplus false_user/false_password@oracleinstance

Oracle.FakeLogin — parameter name, put anything you like there (I don't recall exactly list of allowed chars in name, but A-Z, a-z, 0-9 and "." should be safe)
sqlplus false_user/false_password@oracleinstance — command to be run. Output of this command will be returned by agent.

Also, you  can use arguments (e.g. you can check multiple oracle instances with single external parameter)
Example:
ExternalParameter = Echo(*):echo input was: $1

then we asking agent for this parameter:

$ nxget 127.0.0.1 "Echo(test request)"
input was: test request
#1133
Примерно так:

sub main()
{
if ($1 > 0 && $1 <= 500000) {
return $1;
}

return 0;
}


Кстати, для отладки можно использовать nxscript из комплекта - return-ы заменить на print-ы:
sub main()
{
if ($1 > 0 && $1 <= 500000) {
print $1;
}

print 0;
}


C:\NetXMS\bin>nxscript.exe test.nxc 12345
NetXMS Scripting Host  Version 0.2.19
Copyright (c) 2005, 2006 Victor Kirhenshtein

123450


C:\NetXMS\bin>nxscript.exe test.nxc 1234567
NetXMS Scripting Host  Version 0.2.19
Copyright (c) 2005, 2006 Victor Kirhenshtein

0
#1134
Quote from: Victor Kirhenshtein on March 16, 2008, 09:05:15 PM
... and usage of an agent gives you some additional benefits:

Also, I should note, that you need to deploy them by hand only once. Later, when agent is up and running, you can upgrade it from management console in few clicks.
#1135
Hello.

Unfortunately, https is not yet supported (oh, it was planed months ago...).
As temporary workaround — you can use either external script (with something like curl https://... | grep "keyword | ... ) or setup something like stunnel and configure sevices in netxms (check Victor's link for that).

However, I'll try to put encryption on a schedule for upcoming 0.2.20.
#1136
General Support / Re: DATE fields in mysql database.
January 25, 2008, 07:02:09 PM
Hello.

Date is stored as unix timestamp (number of seconds since 1/1/1970), in php you can convert it to human readable form using date() function.

idata_xx tables contains per-node history data for each DCI (e.g. cpu usage values for retention period), where "xx" is "id" from table "nodes".


p.s. please keep in mind that server keeps operational data in memory and flushing changes in a background, so information in database can be sometimes out of sync or outdated (only while server is running - everything is flushed on shutdown, of course) - especially under heavy load.
p.p.s. you can make some assumptions about out of sync delay by looking at Server.AverageDBWriterQueueSizeAverage DCI.
#1137
Можно получить используя PDH  и различные performance counters.

Пример конфигурации, дописать в nxagentd.conf:

[code]*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" - название секции конфига, относится только к winperf субагенту
"Counter" - описание счетчика. Формат:
   Counter = НазваниеПараметраДляNetXMS:"\Название_PDH_каунтера":количество_семплов:очередь:тип:Описание параметра[/code]

"НазваниеПараметраДляNetXMS" - то, что видно в в консоли, при настройке DCI-ев
"\Название_PDH_каунтера" - я не знаю, как оно называется в русской системе, можно посмотреть в administrative tools -> performance. Для английской системы - \Network Interface(название интерфейса)\Current Bandwidth.
количество_семплов - количество семплов для подсчета average
очередь - варианты: A, B, C. A - опрос раз в секунду, B - раз в 5 секунд, C - раз в 30.

т.е. если указать количество_семплов=60 и очередь=A, то результат будет равен среднему значению за минуту. А 30 и C - average за 15 минут.
#1138
General Support / Re: Log.Scan()?
January 11, 2008, 05:30:55 PM
Hello.

Actually, log scanner in it current state is a more a hack than a production grade code - it was made for a specific task.
However, you can try to use it:

1) while logscan subagent is already included in windows version (i believe so), you should compile it manually on unix (or add "--enable-unstable" parameter to configure, this will enable some additional features, including logscan subagent):
$ cd netxms-VERSION
$ ./configure ...
$ cd src/agent/subagents/logscan
$ make install


2) add libnsm_logscan.so/logscan.nsm to you nxagentd.conf (SubAgent parameter)
3) now you can call LogScan.FindString parameter with two arguments: filename and substring to search. If substring is found - whole string returned, empty string otherwise.

LogScan works on per-line basis; it stops search when substring is found, so if you have multiple lines matching - FindString will return them all. Position in file is persisted between requests; log rotation is detected only by file size (e.g. if last known file position is beyond the end of file)

wbr, alex.
#1139
Общие вопросы / Re: win-console
December 06, 2007, 12:57:22 PM
А минидампа не осталось?
#1140
Quote from: Retter on November 30, 2007, 10:52:06 AM
2007-11-30 15:59:37 FATAL:  no pg_hba.conf entry for host "::1", user "postgres", database "template1", SSL off

Это значит, что пытались подключится на localhost по IPv6, юзером postgres на базу template1.

Покажите netxmsd.conf, пожалуйста.