Баг выглядит знакомым – обновите сервер на M4, скорее всего поможет.
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 MenuQuote from: parovoZZ on May 06, 2015, 01:37:31 PM
А из таблицы-то как получить значения? Вставляю колонки, прописываю OID и сервер уходит в ошибку. Перезапускаю службу и все изменения исчезают.
#!/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)
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?
commit 28e36118c3320b67e119cecab8fd5c324dbc9fef
Author: Alex Kirhenshtein <[email protected]>
Date: Wed May 23 13:17:19 2012 +0000
nxhttpd traces removed
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.
Quote from: parovoZZ on April 20, 2015, 11:32:42 AM
Ну вот на каких-то машинах он доступен, на каких-то нет. Параметр System.CPU.Usage5. Если его добавить вручную, то получаю Unsupported...