Ad Widget

Collapse

Zabbix doesn't work after run a pwsh script

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • faelchrsitofano
    Junior Member
    • Mar 2021
    • 4

    #1

    Zabbix doesn't work after run a pwsh script

    Hey guys!

    After running a Power Shell script, using Discovery Rule with Type "External check", the Zabbix server does not work. The status of the Zabbix server looks like this:

    zabbix-server.service - LSB: Start zabbix-server daemon
    Loaded: loaded (/etc/init.d/zabbix-server; generated)
    Active: active (exited) since Tue 2021-05-18 18:55:06 UTC; 11min ago
    Docs: man:systemd-sysv-generator(8)
    Process: 2093 ExecStart=/etc/init.d/zabbix-server start (code=exited, status=0/SUCCESS)

    May 18 18:58:53 zbxSrvPrd powershell[4198]: (7.1.3:1:80) [Perftrack_ConsoleStartupStart:PowershellConsoleSta rtup.WinStart.Informational] PowerShell console is starting up
    May 18 18:58:54 zbxSrvPrd powershell[4198]: (7.1.3:8:80) [NamedPipeIPC_ServerListenerStarted:NamedPipe.Open. Informational] PowerShell has started an IPC listening thread on process: 4198 in AppDomain: None.
    May 18 18:58:54 zbxSrvPrd powershell[4198]: (7.1.3:1:80) [Perftrack_ConsoleStartupStop:PowershellConsoleStar tup.WinStop.Informational] PowerShell console is ready for user input
    May 18 18:58:54 zbxSrvPrd powershell[4198]: (7.1.3:B:80) [ScriptBlock_Compile_Detail:ExecuteCommand.Create.W arning] Creating Scriptblock text (1 of 1):
    Function New-ZaZabbixItemValue {⏎ [CmdletBinding()]⏎ param (⏎ [Parameter(Mandatory = $true)][string]$zabbixServer,⏎ [Parameter(Mandatory = $false)][ValidateRange(1,65535)][i

    ScriptBlock ID: 5feb94ad-6503-4c22-bf37-ce9d59866a14
    Path: /usr/lib/zabbix/externalscripts/helpers/New-ZaZabbixItemValue.ps1
    May 18 18:58:54 zbxSrvPrd powershell[4198]: (7.1.3:B:80) [ScriptBlock_Compile_Detail:ExecuteCommand.Create.W arning] Creating Scriptblock text (1 of 1):
    function Set-ZaAzureMonitorZabbixHostItemValue {⏎ [CmdletBinding()]⏎ param (⏎ [Parameter(Mandatory = $true)][string]$zabbixHostName,⏎ [Parameter(Mandatory = $true)][string]$

    ScriptBlock ID: af0e3c10-91d5-49e2-8176-71f5e96d2961
    Path: /usr/lib/zabbix/externalscripts/helpers/Set-ZaAzureMonitorZabbixHostItemValue.ps1
    May 18 18:59:15 zbxSrvPrd powershell[4333]: (7.1.3:1:80) [Perftrack_ConsoleStartupStart:PowershellConsoleSta rtup.WinStart.Informational] PowerShell console is starting up
    May 18 18:59:15 zbxSrvPrd powershell[4333]: (7.1.3:8:80) [NamedPipeIPC_ServerListenerStarted:NamedPipe.Open. Informational] PowerShell has started an IPC listening thread on process: 4333 in AppDomain: None.
    May 18 18:59:15 zbxSrvPrd powershell[4333]: (7.1.3:1:80) [Perftrack_ConsoleStartupStop:PowershellConsoleStar tup.WinStop.Informational] PowerShell console is ready for user input
    May 18 18:59:16 zbxSrvPrd powershell[4333]: (7.1.3:B:80) [ScriptBlock_Compile_Detail:ExecuteCommand.Create.W arning] Creating Scriptblock text (1 of 1):
    Function New-ZaZabbixItemValue {⏎ [CmdletBinding()]⏎ param (⏎ [Parameter(Mandatory = $true)][string]$zabbixServer,⏎ [Parameter(Mandatory = $false)][ValidateRange(1,65535)][i

    ScriptBlock ID: 43c6f13d-14d6-4292-bcaf-049645dfed95
    Path: /usr/lib/zabbix/externalscripts/helpers/New-ZaZabbixItemValue.ps1
    May 18 18:59:16 zbxSrvPrd powershell[4333]: (7.1.3:B:80) [ScriptBlock_Compile_Detail:ExecuteCommand.Create.W arning] Creating Scriptblock text (1 of 1):
    function Set-ZaAzureMonitorZabbixHostItemValue {⏎ [CmdletBinding()]⏎ param (⏎ [Parameter(Mandatory = $true)][string]$zabbixHostName,⏎ [Parameter(Mandatory = $true)][string]$

    ScriptBlock ID: 0a4cb51f-fdbd-43f7-8d63-5a08f918cfae
    Path: /usr/lib/zabbix/externalscripts/helpers/Set-ZaAzureMonitorZabbixHostItemValue.ps1

    Looking the field Active is active, but in the Zabbix Front end the status is "zabbix server is not running the information displayed may not be current"

    Someone could please help me with:

    Thanks so lot!


Working...