Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Flatly)
  • No Skin
Collapse
Brand Logo

NetXMS Forum

M

MarkusW

@MarkusW
Unfollow Follow
About
Posts
16
Topics
5
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Can't make AppAgent work
    M MarkusW
    Development

    I'm trying to integrate AppAgent into a small C app. I'm doing a successful AppAgentInit, and then a AppAgentStart call. There are no obvious indications that it doesn't work, except that "nxappget" says "ERROR: Cannot connect to application agent" when I run it with the app name supplied in the APPAGENT_INIT struct. When configuring the local nxagentd with an AppAgent, it outputs the same error message in the logs periodically.

    I've narrowed it down to the fact that it doesn't create a named pipe in /tmp as I would expect from reading the source. But I get no indication as to why. I've tried as root as well without success, so it doesn't seem to be a permission issue.

    There's no helpful log output anywhere.

    I'm using the libraries from NetXMS 3.5.152 source package on a Ubuntu 18.04 machine.

    Init data:

    static APPAGENT_INIT m_info =
    {
            _T("VRECLIENT"),
            _T("root"),
            handleMessage,
            logger,
            1,
            m_parameters,
            0,
            NULL,
            0,
            NULL
    };
    

    The call in main():

            printf("Initializing AppAgent...\n");
            if (!AppAgentInit(&m_info))
            {
                    printf("Init failed!\n");
            }
            printf("Starting AppAgent...\n");
            AppAgentStart();
    

    At this point I start the rest of the application logic, which works well. But the AppAgent part just won't work. I'm not even sure that the pipe listener thread is running at all, and I'm not sure how to check it.

    Do you have any hints on where to look for faults?

    Thank you in advance!


  • NetXMS client refusing to start (macOS High Sierra)
    M MarkusW
    Support

    I got it working. Installed Eclipse, which required Java 8. Installed Java 8, and now NetXMS Console works as expected.


  • NetXMS client refusing to start (macOS High Sierra)
    M MarkusW
    Support

    I just got a new Macbook which I upgraded to macOS 10.13 High Sierra before installing anything else.

    Then I downloaded NetXMS Console 2.1.1. At first start it prompted me to install Java 6, which I did. After that, startup fails with a generic "An error has occurred" message and a reference to a log file (attached).

    Am I missing a dependency or something? I can't remember needing anything else than Java for my previous machine.

    Thank you in advance!


    1506626967438.log


  • Powershell commands in Agent config
    M MarkusW
    Support

    @victor said in Powershell commands in Agent config:

    just tested in on Windows - works as expected.

    I did some further testing on different nodes. Process.CountEx works as expected on Windows 8.1 Pro, but not on Windows 7 Home Premium (don't ask, not my system design  😮 ).

    Is the Windows subagent supposed to be generic, or do you have a specific version subset that is supported?


  • Powershell commands in Agent config
    M MarkusW
    Support

    @victor said in Powershell commands in Agent config:

    Remember that second argument is regular expression, so certain characters have special meaning. For example, \ is an escape character, so to match it you should specify it as \\. As for class name you're probably right - agent extracts only first 255 characters of process command line. I'll fix that in next release.

    Best regards,
    Victor

    Thank you. I have not used any special characters in the second argument.

    I just did some testing. The class path of one of the java processes contains the word "symmetric".

    Process.CountEx(java) returns 2 as expected.
    Process.CountEx(java,symmetric) returns 0.
    Process.CountEx(java,s) returns 1, even though the character "s" is present in the command line of both java processes.
    Process.CountEx(java,sy) returns 0.
    Process.CountEx(java,.) returns 1.

    Process.CountEx(java,_) returns 1 even though _ is not present in either command line.

    It seems no matter what I put as matching pattern, CountEx returns 0 if the pattern is longer than one character (other than regex special chars), and 1 if the pattern is one character.

    Any ideas?


  • Powershell commands in Agent config
    M MarkusW
    Support

    @victor said in Powershell commands in Agent config:

    Hi,

    just tested in on Windows - works as expected. Please provide exact details - process name and command line and how you specify Process.CountEx parameter.

    Best regards,
    Victor

    Thanks for your reply.

    There are two Java processes running on the agent host.

    The process I need to monitor has a long command line (700+ chars), mostly consisting of class path declarations and jvm arguments. I can't give the exact details, but it looks basically like this:

    "java" -cp "C:\SomePath1\;C:\SomePath2\;C:\SomePath3" -DsomeJvmArg1=someValue1 -DsomeJvmArg2=someValue2 com.domain.package.ClassName --someArg someValue
    

    The above is what comes up when I run the PowerShell command

    WMIC path win32_process get Commandline | select-string ClassName
    

    Process.CountEx(java) returns "2" as expected.

    Process.CountEx(java,ClassName) returns "0". I understand this might be because the command line is longer than the MAX_PATH defined in the source code? Since ClassName appears at the end of the long command line.

    However:

    Process.CountEx(java, SomePath1) also returns 0. As does any attempt to match on anything at the beginning of the command line.

    The Windows host seems to be a 32 bit system.


  • Powershell commands in Agent config
    M MarkusW
    Support

    I see now in the docs that CountEx should be able to match the command line as well. It does not work for me unfortunately.

    Process.CountEx(java, <Java class name>) still returns 0. Is there some subtle feature here that I'm missing?

    NetXMS agent version is 2.0.6. Agent is running on a Windows 7 host.
    NetXMS server version is 2.0.3.


  • Powershell commands in Agent config
    M MarkusW
    Support

    I need to monitor a java process on some Windows hosts with the NetXMS Agent installed and running. The regular Process.Count and Process.CountEx only work for the process name, which is "java". This is not enough for my needs, since I need to make sure that java is run with certain arguments.

    In linux, I would simply to a ps aux | grep <Java class or jar name> | wc -l which works for all user permissions.

    I'm not very familiar with neither Windows nor Powershell, but I did manage to construct this one-liner for doing (sort of) the same thing:

    (WMIC path win32_process get Commandline | select-string <Java class name>).Matches.count
    

    This command returns the number of matches, or null if none were found.

    This works when I manually start a powershell with elevated permissions. It does not work through an ExternalParameter in the Agent though. When querying in the DCI config it returns "" even when the process is running. Is this because powershell commands are not run with elevated privileges? The agent itself is run elevated as far as I know.

    The full external parameter line in the config looks like this:

    ExternalParameter = ProcMon.SymmetricLauncher:powershell -Command "& {(WMIC path win32_process get Commandline | select-string <Java class name>).Matches.count}"
    

    I also tried ExternalParameterShellExec, but it didn't work either.

    Are there any simple solutions to my problem?


  • Mac OS X Management Console Installation Error
    M MarkusW
    Support

    @alk said in Mac OS X Management Console Installation Error:

    It seems to be related to Apple's Gatekeeper: http://support.apple.com/kb/ht5290

    Indeed. I had the same problem. Turning off Gatekeeper did work. It's fine as a temporary work-around, but a real fix would be appreciated.


  • nxpush should be included in the netxms-agent deb
    M MarkusW
    Feature Requests

    It seems this is planned for the next release (1.2.9)

    https://www.radensolutions.com/chiliproject/issues/309


  • Contributing code
    M MarkusW
    Development

    I have submitted a small patch in ticket #332 now.

    Looking forward to the git migration by the way. Already in its vanilla implementation it's awesome for collaboration. 🙂


  • Contributing code
    M MarkusW
    Development

    Sounds good, thanks for the reply!


  • Contributing code
    M MarkusW
    Development

    I have been using NetXMS for a long time, and I think it's a great piece of software! As is customary in the open source community, I'd love to show my appreciation by contributing code to the project. So my questions are:

    1. Do you have any established routines/workflow for submitting patches, documentation or otherwise?

    2. Have you considered migrating to GitHub (or equivalent) for easier collaboration and broader project visibility?

    Thanks in advance!


  • NetXMS 1.0.13 released
    M MarkusW
    Announcements

    I would also like to know if there is a time estimate on the release of 1.2. We are planning a long overdue update from 1.0.4 on 1500+ nodes of a production system, and if 1.2 comes soon we may decide to wait for it.


  • nxalarm does not receive info about source node
    M MarkusW
    Support

    Awesome, thanks!


  • nxalarm does not receive info about source node
    M MarkusW
    Support

    First of all, thank you for a great piece of software!

    I have a problem with the nxalarm tool. It does list the active alarms, but all macros for displaying information about the source node expand to the empty string. I have tried it with 1.0.12 as well as older versions, and the result is the same.

    Example:

    A simple test setup with an active alarm with the alarm string "Alarm is active".

    markus@ubuntu:~$ nxalarm localhost list -u admin -P xxxx -o "%a:%n %m"
    : Alarm is active
    
    1 active alarms
    markus@ubuntu:~$
    

    Is this a bug, or am I doing something wrong?

  • Login

  • Don't have an account? Register

  • Login or register to search.
Powered by NodeBB Contributors
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups