Ad Widget

Collapse

Issue with proc.num

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mpt
    Junior Member
    • Aug 2018
    • 2

    #1

    Issue with proc.num

    I'm running into issue when trying to get the process count using proc.num. Currently running the Zabbix Server 3.4.4 with the same agent version on RHEL 7.3. I followed the steps provided here



    Code:
    [root@zabbix1 ~]#  ps -ef | grep zabbix_agentd
    zabbix   24201     1  0 Aug04 ?        00:00:00 /usr/sbin/zabbix_agentd -c /etc/zabbix/zabbix_agentd.conf
    zabbix   24202 24201  0 Aug04 ?        00:01:12 /usr/sbin/zabbix_agentd: collector [idle 1 sec]
    zabbix   24203 24201  0 Aug04 ?        00:05:36 /usr/sbin/zabbix_agentd: listener #1 [waiting for connection]
    zabbix   24204 24201  0 Aug04 ?        00:00:00 /usr/sbin/zabbix_agentd: listener #2 [waiting for connection]
    zabbix   24205 24201  0 Aug04 ?        00:05:32 /usr/sbin/zabbix_agentd: listener #3 [waiting for connection]
    zabbix   24206 24201  0 Aug04 ?        00:00:17 /usr/sbin/zabbix_agentd: active checks #1 [idle 1 sec]
    but it only returned 1 instead of 6

    Code:
    [root@zabbix1 ~]# zabbix_get -s 127.0.0.1 -k 'proc.num[zabbix_agentd,zabbix]'
    1
    So I enabled more debugging on the agent log and saw the following and it seemed to me zabbix_get was only able to retrieve and see its own process and not the other 6 processes running abbix_agentd.

    Code:
    Requested [proc.num[zabbix_agentd,zabbix]]
    Sending back [1]
    I'm not certain where or why the process is missing or not available from zabbix_get command. Can someone please help?
  • mpt
    Junior Member
    • Aug 2018
    • 2

    #2
    Just want to answer my own question. The hardened RHEL in question has hidepid=2 set on /proc which prevents regular zabbix user from seeing other users' processes. The fix was to create another monitoring group, add the zabbix user to that group, and remount /proc with gid of monitoring group.

    https://www.cyberciti.biz/faq/linux-...m-other-users/

    Comment

    Working...