trigger action on remote host

Started by jamesof, May 07, 2013, 10:08:55 PM

Previous topic - Next topic

jamesof

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.

Victor Kirhenshtein

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

jamesof

#2
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 ?

Victor Kirhenshtein

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

jamesof

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.

Victor Kirhenshtein

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

jamesof

thank you for your support
it works .