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

#466
General Support / deleteRow issues
January 29, 2016, 01:23:12 PM
Hi,

I have some SNMP tables I would like to delete rows from. Looks like I should use the deleteRow function for that.
Unfortunately I can't get it to work.
I have attached a CSV with actual data from one of the tables. The script I am using is below:

sub main()
{
idxStatus = $1->getColumnIndex("Status");
for (i = 0; i < $1->rowCount; i++)
{
trace(0,$1->get(i,idxStatus));
if ( $1->get(i,idxStatus) == "Unavailable" )
{
trace(0,"Deleting Row");
$1->deleteRow(i);
}
}
}


As you can see, I added some debugging output already.
Here's the result from the logs. Based on that I would have expected the "Unavailable" rows to disappear from the table:
[29-Jan-2016 21:21:27.892] [INFO ] Healthy
[29-Jan-2016 21:21:27.892] [INFO ] Healthy
[29-Jan-2016 21:21:27.892] [INFO ] Healthy
[29-Jan-2016 21:21:27.892] [INFO ] Healthy
[29-Jan-2016 21:21:27.892] [INFO ] Healthy
[29-Jan-2016 21:21:27.892] [INFO ] Healthy
[29-Jan-2016 21:21:27.892] [INFO ] Healthy
[29-Jan-2016 21:21:27.892] [INFO ] Healthy
[29-Jan-2016 21:21:27.892] [INFO ] Healthy
[29-Jan-2016 21:21:27.893] [INFO ] Healthy
[29-Jan-2016 21:21:27.893] [INFO ] Healthy
[29-Jan-2016 21:21:27.893] [INFO ] Healthy
[29-Jan-2016 21:21:27.893] [INFO ] Healthy
[29-Jan-2016 21:21:27.893] [INFO ] Healthy
[29-Jan-2016 21:21:27.893] [INFO ] Unavailable
[29-Jan-2016 21:21:27.893] [INFO ] Deleting Row
[29-Jan-2016 21:21:27.893] [INFO ] Unavailable
[29-Jan-2016 21:21:27.893] [INFO ] Deleting Row


Yet, they are not deleted. Am I using the deleteRow function incorrectly?

I also found some other oddity in that sometimes the logs return rather strange results:
[29-Jan-2016 21:51:44.313] [INFO ] ??althy
[29-Jan-2016 21:51:44.313] [INFO ] ??althy
[29-Jan-2016 21:51:44.313] [INFO ] w?althy
[29-Jan-2016 21:51:44.313] [INFO ] ??available
[29-Jan-2016 21:51:44.313] [INFO ] V?available


Is that an indication of the SNMP packets coming back with corrupt data?

#467
General Support / Re: Brocade MIB Import Failing
January 19, 2016, 01:19:07 PM
That was it. BRCD-REG was a different version of the same MIB.
Found another one as well, SW.txt and SW-MIB.txt. Same thing, different versions.

I shall look for duplicates next time I run into one of these.

Thanks!
#468
Feature Requests / Automatic Zone ID
January 17, 2016, 11:57:16 PM
Hi,

I am not sure as to the exact reasoning of requiring a manually entered Zone ID when a new zone is created, but when you need a lot of zones this seems like an unnecessary thing to ask of the user/admin. Could this be automatically set to the next available one, just like node and DCI IDs?

Thanks
#469
General Support / Re: Brocade MIB Import Failing
January 17, 2016, 02:27:39 AM
Still not working for me. Wondering if there is something else in my MIBs folder that's messing with the Brocade ones (I have a handful of Brocade ones that don't compile, I just picked the LLDP-EXT one as an example as it was the first that failed).
The MIB files all have .txt file extensions.

I've attached the contents of my mibs folder. Any chance you could try to compile that "as is" at your end? I am curious to see if that will work (in which case something else on my system must be causing the issue) or if the compile will fail (in which case there is "something" in that folder that's breaking it.
#470
General Support / Re: Brocade MIB Import Failing
January 15, 2016, 02:16:35 PM
Hi,

The Brocade-REG-MIB is already in the folder and doesn't throw any errors by itself.
Hence I posted the contents of the Brocade-REG-MIB, hoping someone might be able to help me work out why that particular MIB doesn't throw errors, but a second MIB that depends on it does - with a reference to an object that is defined in the compiled Brocade-REG-MIB.

I'm at a loss, as that really doesn't make much sense to me.

Cheers
#471
General Support / Brocade MIB Import Failing
January 14, 2016, 02:34:06 PM
Hi all,

I have an issue with a number of Brocade MIBs. When I try to import them I get errors like this one:
BROCADE-LLDP-EXT-DOT3-CAPABILITY-MIB: ERROR 001: Import symbol "brocadeAgentCapability" unresolved

Based on that particular MIB, it tries to import that particular symbol from the Brocade REG-MIB:
IMPORTS
    brocadeAgentCapability
        FROM Brocade-REG-MIB


Clearly something is not being imported or referenced right, but I'm no MIB expert and can't tell what's wrong. Contents of the Brocade-REG-MIB below:

Brocade-REG-MIB DEFINITIONS ::= BEGIN

IMPORTS
    MODULE-IDENTITY,
    OBJECT-IDENTITY,
    enterprises                     FROM SNMPv2-SMI;

bcsi MODULE-IDENTITY
        LAST-UPDATED        "201202030000Z"
        ORGANIZATION        " Brocade Communications Systems, Inc."
        CONTACT-INFO
                "Brocade Communications Systems, Inc.
                 Postal: 130 Holger Way
                 San Jose, CA 95134
                 U.S.A
                 Tel: +1-408-333-8000
                 E-mail: [email protected]
                 web: www.brocade.com."
        DESCRIPTION
                "This MIB module defines Structure of Management
                Information for the Brocade enterprise and serves as
                central repository of all the OIDs under Brocade
                enterprise OID tree."

        REVISION        "201202030000Z"
        DESCRIPTION
                "Initial version of this MIB module."
        ::= { enterprises 1588 }        -- assigned by IANA

commDev OBJECT-IDENTITY
    STATUS  current
    DESCRIPTION
        "The root OID sub-tree for Communication devices of Brocade."
    ::= { bcsi 2 }

fibrechannel   OBJECT-IDENTITY
    STATUS  current
    DESCRIPTION
        "The root OID sub-tree for Fibre Channel Devices of Brocade."
    ::= { commDev 1 }

nos OBJECT-IDENTITY
    STATUS  current
        DESCRIPTION
                "The root OID sub-tree for Brocade's NOS products."
        ::= { commDev 2 }

fcSwitch OBJECT-IDENTITY
    STATUS  current
    DESCRIPTION
        "The root OID sub-tree for Fibre Channel Switches of Brocade."
    ::= { fibrechannel 1 }

bcsiReg OBJECT-IDENTITY
    STATUS  current
    DESCRIPTION
        "The root OID sub-tree for Brocade Global Registry."
    ::= { bcsi 3 }

bcsiModules OBJECT-IDENTITY
    STATUS  current
    DESCRIPTION
        "The root OID sub-tree for all the Brocade management MIBs."
    ::= { bcsiReg 1 }

brocadeAgentCapability OBJECT-IDENTITY
        STATUS  current
        DESCRIPTION
                "This provides a root object identifier from which
        AGENT-CAPABILITIES values may be assigned."
        ::= { bcsiReg 2 }
END


Any pointers?
#472
Hi,

I've setup a template to monitor some Windows Performance Counters for average disk sec/Write, sec/Read, etc.
Originally I stuffed that up and left the sample count at "0" which resulted in getting no data for those counters.
So after figuring that out, I changed the template to set the sample count to "2".

However this change does not get applied to any of the systems already assigned to the template.

New systems receive the correct sample count. Old ones do not.
Running a "Full" Configuration Poll doesn't help.
I have to remove the systems from the template (which also means removing the DCIs and any historic data) and then either manually re-assign them or run a configuration poll again so they are automatically re-added to the template. At that point the sample count is correct.

Not quite sure why the changed sample count doesn't automatically apply to systems already using the template?
#473
Thanks! That worked without having to go through custom attributes. :)

I still had some issues with problem no. 1, as it "moved" from the DCI script to template auto-bind one.
However adding another line of code resolved that. I also changed the script it to only apply to Windows systems.
So now it looks like this and does not throw any more errors:

if ( (! $node->isAgent) && (! $node->platformName ~= "windows.*") )
return false;

table = AgentReadTable($node, "System.InstalledProducts");

if ( table == null )
return false;

colName = table->getColumnIndex("NAME");

for (currentRow = 0; currentRow < table->rowCount; currentRow++)
{
if ( table->get(currentRow, colName) == "Microsoft Exchange Server" )
return true;
}

return false;



Still not quite sure what to do in regards to installed Windows Features.  :-\
#474
Hi,

To answer my own question somewhat, I managed to do what I had planned by creating a script that checks System.InstalledProducts, returns "OK" (no matter what) and assigning this to a DCI.
Along the way of checking that table, it sets custom attributes for any installed product that I want to monitor.
That then allows me to apply templates to systems with those custom attributes set.

Script below (for testing I only checked for Microsoft Exchange Server, but can be adjusted to other things):

sub main()
{
table=AgentReadTable($node,"System.InstalledProducts");
idxName = table->getColumnIndex("NAME");
for (row = 0; row < table->rowCount; row++)
{
value = table->get(row, idxName);
switch (value)
{
case "Microsoft Exchange Server": SetCustomAttribute($node,"Microsoft Exchange Server","Installed");
}
}
return "OK";
}



Now I have a couple more problems:

1. My NetXMS server now keeps throwing up alarms against itself all the time: "Script (System::SetInstalledPackageAttributes) execution error: Error 14 in line 4: Function or operation argument is not an object". "System::SetInstalledPackageAttributes" being the name of the script. The script is not actually called against the server itself, so this appears to be an issue when the server calls it against a node? This DCI is only applied to systems with the NetXMS agent installed and running Windows. All of which should have System.InstalledPackages?

2. This only works for software showing in that table, which doesn't include Remote Desktop Session Hosts or any other "Windows Feature". I could check for thos via (deprecated) WMI Query (which may also run into timeouts) or I would have to call PowerShell's Get-WindowsFeature cmdlet. Unfortunately I have currently no idea how to do that one in NetXMS... maybe an idea for a subagent? Together with uploading PowerShell scripts, that could be quite powerful?
#475
Feature Requests / Custom Maps with (Background) Images
November 15, 2015, 11:06:27 PM
Hi,

I've been trying to use some custom maps with background (and non-background) images, e.g. to show a server rack image or similar.
When I add the background image, I can drag the relevant nodes over the image once - and then never again. It's like the background image prevents me from clicking on the node icons.
The only way I can move things afterwards is by removing the background image, then moving the icons, then re-adding the background image.
While I can sort-of understand that behaviour for non-background images, it makes little sense for actual background ones?

Edit:
Another thing I noticed while doing this: I cannot edit the text colour "per node, per map". It's a global setting only.
That leads to an issue with maps with bright and dark backgrounds: I can change the global text settings to suit only one, not both.
#476
Hi,

I've been using the VPN Connector already, but that's really only for Layer 3.
Is there a way to do the same thing, but for Layer 2 maps so that a Layer 2 map can show the full network setup across multiple sites?
#477
General Support / Assigning Map icons based on templates
November 15, 2015, 10:56:35 PM
Hi,

I'd like to be able to assign map icons based on a template (e.g. to allow using per-vendor icons for printers, servers, etc.).
Current templates do not seem to support that functionality (at least there is no direct option for that within the template properties).
Any idea how else this could be achieved?
#478
Feature Requests / Node Creation - Cannot set ICMP Proxy
November 15, 2015, 10:53:17 PM
Hi,

During creation of a new node, there is no option to set the ICMP Proxy for the new node.
The option exists for SNMP and the NetXMS Agent, but for ICMP I have to open the node properties after creation and manually set it there?
#479
Hi,

While I can easily apply a template to a Windows system with a NetXMS Agent on it, I am having trouble narrowing this down further to, for example, systems running Microsoft Exchange, SQL or other software.
NetXMS has the required data for this, but how do I test for this within the Template's Automatic Apply Rules?

Of course I can apply a DCI to all Windows systems with a NetXMS Agent, run a test and use that, but I want to avoid having to add a DCI for this in the first place as the data already exists in NetXMS (why check twice?).

Any ideas?