NetXMS Support Forum

English Support => General Support => Topic started by: jamesof on May 07, 2013, 10:08:55 PM

Title: trigger action on remote host
Post by: jamesof on May 07, 2013, 10:08:55 PM
hi guys
i am new to netxms
i have a problem with action on remote agent
on agent i have this
#
# NetXMS agent configuration file
# Created by agent installer at Tue May 07 02:57:49 2013
#

ConfigIncludeDir = C:\NetXMS\etc\nxagentd.conf.d
LogFile = {syslog}
FileStore = C:\NetXMS\var
SubAgent = ecs.nsm
SubAgent = ping.nsm
SubAgent = logwatch.nsm
SubAgent = portcheck.nsm
SubAgent = winperf.nsm
*WinPerf
Action= dir:cmd.exe /c "dir c:\ > c:\1.txt"
SubAgent = wmi.nsm
SubAgent = ups.nsm

and in object tools
i have a action with properties

Name :dir
agent action:
cmd.exe /c "dir c:\ > c:\1.txt"

but nothing happens. what is wrong?
is there any documentation about actions?
Best regards.
Title: Re: trigger action on remote host
Post by: Victor Kirhenshtein on May 07, 2013, 11:15:03 PM
Hi!

There are two problems in your config:

1. You put Action keyword in wrong section. It should be like this:

ConfigIncludeDir = C:\NetXMS\etc\nxagentd.conf.d
LogFile = {syslog}
FileStore = C:\NetXMS\var
SubAgent = ecs.nsm
SubAgent = ping.nsm
SubAgent = logwatch.nsm
SubAgent = portcheck.nsm
SubAgent = winperf.nsm
Action= dir:cmd.exe /c "dir c:\ > c:\1.txt"
SubAgent = wmi.nsm
SubAgent = ups.nsm

2. On server side, you should only put name of the action configured on agent in "agent action" field. It will be just dir in your case.

Best regards,
Victor
Title: Re: trigger action on remote host
Post by: jamesof on May 08, 2013, 06:41:55 PM
thanks
it works.
just three other questions. ;D
is it possible to return generated output. i remember you said it is not possible (around 2010) . is this feature added to netxms?
can i set snmp oid with agent?
can i define security policies on agent ?
Title: Re: trigger action on remote host
Post by: Victor Kirhenshtein on May 09, 2013, 03:07:38 PM
Quote from: jamesof on May 08, 2013, 06:41:55 PM
is it possible to return generated output. i remember you said it is not possible (around 2010) . is this feature added to netxms?

still not possible :(

Quote from: jamesof on May 08, 2013, 06:41:55 PM
can i set snmp oid with agent?

Only by calling external tools. You can copy nxsnmpset to agent and configure action which will call it.

Quote from: jamesof on May 08, 2013, 06:41:55 PM
can i define security policies on agent ?

what do you mean by security policy on agent?

Best regards,
Victor
Title: Re: trigger action on remote host
Post by: jamesof on May 09, 2013, 06:20:53 PM
Quotewhat do you mean by security policy on agent?
agent check manager have right to do action.

and another question . can we have any accounting feature? which user how many usage which app ... for any session in remote device that running agent .
thank you.
Title: Re: trigger action on remote host
Post by: Victor Kirhenshtein on May 10, 2013, 04:32:02 PM
Quote from: jamesof on May 09, 2013, 06:20:53 PM
Quotewhat do you mean by security policy on agent?
agent check manager have right to do action.

There are 3 level of access for an agent. Depending on how server's IP address listen in nxagentd.conf, it will have different access level. If server listed in:

1. MasterServers - full access
2. ControlServers - can read data and execute predefined actions, but cannot change config nor install policies.
3. Servers - read only access

Quote from: jamesof on May 09, 2013, 06:20:53 PM
and another question . can we have any accounting feature? which user how many usage which app ... for any session in remote device that running agent .

No, we don't have functionality like that.

Best regards,
Victor
Title: Re: trigger action on remote host
Post by: jamesof on May 12, 2013, 11:37:17 PM
thank you for your support
it works .