Uploaded image for project: 'ZABBIX FEATURE REQUESTS'
  1. ZABBIX FEATURE REQUESTS
  2. ZBXNEXT-9509

systemd plugin should also offer data from the .service interface of dbus

XMLWordPrintable

    • Icon: New Feature Request New Feature Request
    • Resolution: Unresolved
    • Icon: Low Low
    • None
    • None
    • Agent2 plugin (N)
    • None

      The plugin currently only provides data from the "Unit" dbus interface. On my system that's

      AccessSELinuxContext ConditionTimestampMonotonic JobTimeoutUSec Requisite
      ActivationDetails Conditions JoinsNamespaceOf RequisiteOf
      ActiveEnterTimestamp ConflictedBy LoadError SliceOf
      ActiveEnterTimestampMonotonic Conflicts LoadState SourcePath
      ActiveExitTimestamp ConsistsOf Markers StartLimitAction
      ActiveExitTimestampMonotonic DefaultDependencies Names StartLimitBurst
      ActiveState Description NeedDaemonReload StartLimitIntervalUSec
      After Documentation OnFailure StateChangeTimestamp
      AllowIsolate DropInPaths OnFailureJobMode StateChangeTimestampMonotonic
      AssertResult FailureAction OnFailureOf StopPropagatedFrom
      AssertTimestamp FailureActionExitStatus OnSuccess StopWhenUnneeded
      AssertTimestampMonotonic Following OnSuccessJobMode SubState
      Asserts FragmentPath OnSuccessOf SuccessAction
      Before FreezerState PartOf SuccessActionExitStatus
      BindsTo Id Perpetual Transient
      BoundBy IgnoreOnIsolate PropagatesReloadTo TriggeredBy
      CanClean InactiveEnterTimestamp PropagatesStopTo Triggers
      CanFreeze InactiveEnterTimestampMonotonic RebootArgument UnitFilePreset
      CanIsolate InactiveExitTimestamp Refs UnitFileState
      CanReload InactiveExitTimestampMonotonic RefuseManualStart UpheldBy
      CanStart InvocationID RefuseManualStop Upholds
      CanStop Job ReloadPropagatedFrom WantedBy
      CollectMode JobRunningTimeoutUSec RequiredBy Wants
      ConditionResult JobTimeoutAction Requires
      ConditionTimestamp JobTimeoutRebootArgument RequiresMountsFor

      I would be interesting in some of the other bits systemctl show has to offer for me, that come from the interface "Service":

      AllowedCPUs Group ManagedOOMMemoryPressureLimit RuntimeDirectoryPreserve
      AllowedMemoryNodes GuessMainPID ManagedOOMPreference RuntimeDirectorySymlink
      AmbientCapabilities IOAccounting ManagedOOMSwap RuntimeMaxUSec
      AppArmorProfile IODeviceLatencyTargetUSec MemoryAccounting RuntimeRandomizedExtraUSec
      BPFProgram IODeviceWeight MemoryAvailable SELinuxContext
      BindPaths IOReadBandwidthMax MemoryCurrent SameProcessGroup
      BindReadOnlyPaths IOReadBytes MemoryDenyWriteExecute SecureBits
      BlockIOAccounting IOReadIOPSMax MemoryHigh SendSIGHUP
      BlockIODeviceWeight IOReadOperations MemoryLimit SendSIGKILL
      BlockIOReadBandwidth IOSchedulingClass MemoryLow SetCredential
      BlockIOWeight IOSchedulingPriority MemoryMax SetCredentialEncrypted
      BlockIOWriteBandwidth IOWeight MemoryMin Slice
      BusName IOWriteBandwidthMax MemorySwapMax SmackProcessLabel
      CPUAccounting IOWriteBytes MountAPIVFS SocketBindAllow
      CPUAffinity IOWriteIOPSMax MountFlags SocketBindDeny
      CPUAffinityFromNUMA IOWriteOperations MountImages StandardError
      CPUQuotaPerSecUSec IPAccounting NFileDescriptorStore StandardErrorFileDescriptorName
      CPUQuotaPeriodUSec IPAddressAllow NRestarts StandardInput
      CPUSchedulingPolicy IPAddressDeny NUMAMask StandardInputData
      CPUSchedulingPriority IPCNamespacePath NUMAPolicy StandardInputFileDescriptorName
      CPUSchedulingResetOnFork IPEgressBytes NetworkNamespacePath StandardOutput
      CPUShares IPEgressFilterPath Nice StandardOutputFileDescriptorName
      CPUUsageNSec IPEgressPackets NoExecPaths StartupAllowedCPUs
      CPUWeight IPIngressBytes NoNewPrivileges StartupAllowedMemoryNodes
      CacheDirectory IPIngressFilterPath NonBlocking StartupBlockIOWeight
      CacheDirectoryMode IPIngressPackets NotifyAccess StartupCPUShares
      CacheDirectorySymlink IgnoreSIGPIPE OOMPolicy StartupCPUWeight
      CapabilityBoundingSet InaccessiblePaths OOMScoreAdjust StartupIOWeight
      CleanResult KeyringMode PAMName StateDirectory
      ConfigurationDirectory KillMode PIDFile StateDirectoryMode
      ConfigurationDirectoryMode KillSignal PassEnvironment StateDirectorySymlink
      ControlGroup LimitAS Personality StatusErrno
      ControlGroupId LimitASSoft PrivateDevices StatusText
      ControlPID LimitCORE PrivateIPC SuccessExitStatus
      CoredumpFilter LimitCORESoft PrivateMounts SupplementaryGroups
      DefaultMemoryLow LimitCPU PrivateNetwork SyslogFacility
      DefaultMemoryMin LimitCPUSoft PrivateTmp SyslogIdentifier
      Delegate LimitDATA PrivateUsers SyslogLevel
      DelegateControllers LimitDATASoft ProcSubset SyslogLevelPrefix
      DeviceAllow LimitFSIZE ProtectClock SyslogPriority
      DevicePolicy LimitFSIZESoft ProtectControlGroups SystemCallArchitectures
      DisableControllers LimitLOCKS ProtectHome SystemCallErrorNumber
      DynamicUser LimitLOCKSSoft ProtectHostname SystemCallFilter
      EffectiveCPUs LimitMEMLOCK ProtectKernelLogs SystemCallLog
      EffectiveMemoryNodes LimitMEMLOCKSoft ProtectKernelModules TTYColumns
      Environment LimitMSGQUEUE ProtectKernelTunables TTYPath
      EnvironmentFiles LimitMSGQUEUESoft ProtectProc TTYReset
      ExecCondition LimitNICE ProtectSystem TTYRows
      ExecConditionEx LimitNICESoft ReadOnlyPaths TTYVHangup
      ExecMainCode LimitNOFILE ReadWritePaths TTYVTDisallocate
      ExecMainExitTimestamp LimitNOFILESoft ReloadResult TasksAccounting
      ExecMainExitTimestampMonotonic LimitNPROC RemainAfterExit TasksCurrent
      ExecMainPID LimitNPROCSoft RemoveIPC TasksMax
      ExecMainStartTimestamp LimitRSS Restart TemporaryFileSystem
      ExecMainStartTimestampMonotonic LimitRSSSoft RestartForceExitStatus TimeoutAbortUSec
      ExecMainStatus LimitRTPRIO RestartKillSignal TimeoutCleanUSec
      ExecPaths LimitRTPRIOSoft RestartPreventExitStatus TimeoutStartFailureMode
      ExecReload LimitRTTIME RestartUSec TimeoutStartUSec
      ExecReloadEx LimitRTTIMESoft RestrictAddressFamilies TimeoutStopFailureMode
      ExecSearchPath LimitSIGPENDING RestrictFileSystems TimeoutStopUSec
      ExecStart LimitSIGPENDINGSoft RestrictNamespaces TimerSlackNSec
      ExecStartEx LimitSTACK RestrictNetworkInterfaces Type
      ExecStartPost LimitSTACKSoft RestrictRealtime UID
      ExecStartPostEx LoadCredential RestrictSUIDSGID UMask
      ExecStartPre LoadCredentialEncrypted Result USBFunctionDescriptors
      ExecStartPreEx LockPersonality RootDirectory USBFunctionStrings
      ExecStop LogExtraFields RootDirectoryStartOnly UnsetEnvironment
      ExecStopEx LogLevelMax RootHash User
      ExecStopPost LogNamespace RootHashPath UtmpIdentifier
      ExecStopPostEx LogRateLimitBurst RootHashSignature UtmpMode
      ExitType LogRateLimitIntervalUSec RootHashSignaturePath WatchdogSignal
      ExtensionDirectories LogsDirectory RootImage WatchdogTimestamp
      ExtensionImages LogsDirectoryMode RootImageOptions WatchdogTimestampMonotonic
      FileDescriptorStoreMax LogsDirectorySymlink RootVerity WatchdogUSec
      FinalKillSignal MainPID RuntimeDirectory WorkingDirectory
      GID ManagedOOMMemoryPressure RuntimeDirectoryMode

      I'm particularly interested in MemoryCurrent at the moment. I know that I can gather this information from cgroupfs too, knowing the name of the unit, but it feels clumsy to do so. The actual items exposed in this interface might depend on the cgroup accounting settings on the system. Permissions don't seem to be much of a blocker, looking at the ssh service as the user zabbix here:

      zabbix@myserver:~$ busctl get-property org.freedesktop.systemd1 /org/freedesktop/systemd1/unit/ssh_2eservice org.freedesktop.systemd1.Service MemoryCurrent
      t 7520256

      I propose an item like the existing unit.info that prototype items can depend on.

            esneiders Eriks Sneiders
            volter Volker Fröhlich
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: