$ dspmqver
Name: IBM MQ
Version: 9.3.0.2
I'm trying to query local queues using a Zabbix agent.
Basically, the agent runs this command.
echo 'DISPLAY QLOCAL(*) WHERE(CURDEPTH GE 0)' | runmqsc QMName
However, the Zabbix user is not authorized.
Starting MQSC for queue manager QMName.
AMQ8135E: Not authorized.
No MQSC commands read.
I tried to add the zabbix
user to the mqm
user group, but it didn't work.
usermod -aG mqm zabbix
When I checked the logs, I found that the user did not have sufficient privileges to access the QM.
AMQ8077W: Entity 'zabbix' has insufficient authority to access object
QMName [qmgr].
EXPLANATION:
The specified entity is not authorized to access the required object. The
following requested permissions are unauthorized: connect
So, I added the connect
permission.
SET AUTHREC OBJTYPE(QMGR) GROUP('zabbix') AUTHADD(CONNECT)
Then I got a new permission error.
AMQ8245W: Entity 'zabbix' has insufficient authority to display object
QMName [qmgr].
EXPLANATION:
The specified entity is not authorized to display the required object. The
following requested permissions are unauthorized: dsp
I then added the dsp
permission.
SET AUTHREC OBJTYPE(QMGR) GROUP('zabbix') AUTHADD(DSP)
But, this time, the query resulted in an error for each queue.
AMQ8245W: Entity 'zabbix' has insufficient authority to display object
QE.TEST [queue].
EXPLANATION:
The specified entity is not authorized to display the required object. The
following requested permissions are unauthorized: dsp
Since there are many queues for each QM, I could not figure out how to add permission to the Zabbix user for all queues.
Can you guys help out?
------------------------------
Daniel Daniel Maia Dias
------------------------------