Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

script sends not all tasks to zabbix server #7

Open
sciensys opened this issue Feb 19, 2020 · 0 comments
Open

script sends not all tasks to zabbix server #7

sciensys opened this issue Feb 19, 2020 · 0 comments

Comments

@sciensys
Copy link

sciensys commented Feb 19, 2020

Windows 2016 Server standard with zabbix agent 4.4
Scheduler includes over 10 tasks:

  • 4 custom created; author: admin; running: another admin
  • 3 system created; author: user; running: the same user; (it's User_Feed_Synchronization}
  • 2 third party created; running: admin
  • 1 system; author: CreateExplorerShellUnelevated; running: admin

if run powershell, and execute: Get-ScheduledTask -TaskPath \ | where {$_.state -like "Ready" -or "Running"}
I see only 1 task: system; author: CreateExplorerShellUnelevated;
if run powershell as Administrator:
I see all tasks

when works your script, zabbix server receive only 2 task: third party; running: admin
third party created task, means that author not user, system or other build-in accounts and services.

Could you help ?

p.s. Based on the foregoing, your script can send to server only third party created tasks, сonsidering the above conditions,
regardless of the parameters in zabbix_agentd.conf

EnableRemoteCommands=1
UnsafeUserParameters=1
UserParameter=TaskSchedulerMonitoring[*],powershell -NoProfile -ExecutionPolicy Bypass -File "C:\Program Files\Zabbix Agent\scripts\DiscoverScheduledTasks.ps1" "$1" "$2"

in DiscoverScheduledTasks.ps1 changed path with: path = " \ "

script can't get tasks, created by users, admins, system or services

@sciensys sciensys changed the title not all tasks sends to zabbix server not all tasks send to zabbix server Feb 19, 2020
@sciensys sciensys changed the title not all tasks send to zabbix server script sends not all tasks to zabbix server Feb 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant