Configuring IBM MQ authority
You need to provide all the necessary access rights for IBM MQ sensors to query and gather monitoring data if the Instana agent is run by a nonprivileged user.
Depending on the user (privileged or nonprivileged) installing the Instana agent, the agent's ability to access and display monitoring data in the Instana UI varies.
-
Privileged user: If the Instana agent is installed by using a privileged user, it has all the necessary authorities. Therefore, you can view all the monitoring data in the Instana UI.
-
Nonprivileged user: If the Instana agent is installed by using a nonprivileged user to connect to the queue manager, you must grant appropriate Object Authority Manager (OAM) authorities to the user to query all the monitoring data.
Granting IBM MQ OAM authorities
To provide the IBM MQ OAM authorities to a nonprivileged user, use the setmqaut control command or MQSC commands. The setmqaut command is in the $MQ_INSTALLED_DIR/bin directory.
setmqaut command or MQSC commands must be a privileged user.-
To grant the user the appropriate authorities to access queue manager that you want to monitor, run one of the following commands:
-
setmqautcommand:setmqaut -m QMGR -t qmgr -p UserID +connect +dsp +inq -
MQSC command:
SET AUTHREC PRINCIPAL('UserID') OBJTYPE(QMGR) AUTHADD(CONNECT,DSP,INQ)
Where:
-
QMGR: Name of Queue Manager -
UserID: User ID of the user.
You must specify the fully qualified user for the
-poption. For example, -p user@domain or -p user@host.Note: To specify a user group name, replace the-poption with the-goption in thesetmqautcommand. -
-
For the Instana UI to display data, the user specified by
UserIDneeds access to various objects. To grant the appropriate authorities, run one of the following set of commands:-
setmqautcommands:setmqaut -m QMGR -t queue -n SYSTEM.ADMIN.COMMAND.QUEUE -p UserID +dsp +inq +put +chg setmqaut -m QMGR -t queue -n SYSTEM.DEFAULT.MODEL.QUEUE -p UserID +dsp +get setmqaut -m QMGR -t queue -n SYSTEM.ADMIN.STATISTICS.QUEUE -p UserID +dsp +inq +get +chg setmqaut -m QMGR -t queue -n SYSTEM.ADMIN.QMGR.EVENT -p UserID +dsp +inq +get +chg setmqaut -m QMGR -t queue -n SYSTEM.ADMIN.PERFM.EVENT -p UserID +dsp +inq +get +chg setmqaut -m QMGR -t queue -n SYSTEM.ADMIN.CHANNEL.EVENT -p UserID +dsp +inq +get +chg setmqaut -m QMGR -t queue -n SYSTEM.ADMIN.LOGGER.EVENT -p UserID +dsp +inq +get +chg setmqaut -m QMGR -t queue -n SYSTEM.ADMIN.CONFIG.EVENT -p UserID +dsp +inq +get +chg setmqaut -m QMGR -t queue -n SYSTEM.ADMIN.COMMAND.EVENT -p UserID +dsp +inq +get +chg setmqaut -m QMGR -t queue -n "**" -p UserID +dsp +inq +chg setmqaut -m QMGR -t channel -n "**" -p UserID +dsp setmqaut -m QMGR -t clntconn -n "**" -p UserID +dsp setmqaut -m QMGR -t listener -n "**" -p UserID +dsp setmqaut -m QMGR -t topic -n "**" -p UserID +dsp -
MQSC commands:
SET AUTHREC PROFILE('SYSTEM.ADMIN.COMMAND.QUEUE') OBJTYPE(QUEUE) PRINCIPAL('UserID') AUTHADD(DSP,INQ,PUT,CHG) SET AUTHREC PROFILE('SYSTEM.DEFAULT.MODEL.QUEUE') OBJTYPE(QUEUE) PRINCIPAL('UserID') AUTHADD(DSP,GET) SET AUTHREC PROFILE('SYSTEM.ADMIN.STATISTICS.QUEUE') OBJTYPE(QUEUE) PRINCIPAL('UserID') AUTHADD(DSP,INQ,GET,CHG) SET AUTHREC PROFILE('SYSTEM.ADMIN.QMGR.EVENT') OBJTYPE(QUEUE) PRINCIPAL('UserID') AUTHADD(DSP,INQ,GET,CHG) SET AUTHREC PROFILE('SYSTEM.ADMIN.PERFM.EVENT') OBJTYPE(QUEUE) PRINCIPAL('UserID') AUTHADD(DSP,INQ,GET,CHG) SET AUTHREC PROFILE('SYSTEM.ADMIN.CHANNEL.EVENT') OBJTYPE(QUEUE) PRINCIPAL('UserID') AUTHADD(DSP,INQ,GET,CHG) SET AUTHREC PROFILE('SYSTEM.ADMIN.LOGGER.EVENT') OBJTYPE(QUEUE) PRINCIPAL('UserID') AUTHADD(DSP,INQ,GET,CHG) SET AUTHREC PROFILE('SYSTEM.ADMIN.CONFIG.EVENT') OBJTYPE(QUEUE) PRINCIPAL('UserID') AUTHADD(DSP,INQ,GET,CHG) SET AUTHREC PROFILE('SYSTEM.ADMIN.COMMAND.EVENT') OBJTYPE(QUEUE) PRINCIPAL('UserID') AUTHADD(DSP,INQ,GET,CHG) SET AUTHREC PROFILE('**') OBJTYPE(QUEUE) PRINCIPAL('UserID') AUTHADD(DSP,INQ,CHG) SET AUTHREC PROFILE('**') OBJTYPE(CHANNEL) PRINCIPAL('UserID') AUTHADD(DSP) SET AUTHREC PROFILE('**') OBJTYPE(CLNTCONN) PRINCIPAL('UserID') AUTHADD(DSP) SET AUTHREC PROFILE('**') OBJTYPE(LISTENER) PRINCIPAL('UserID') AUTHADD(DSP) SET AUTHREC PROFILE('**') OBJTYPE(TOPIC) PRINCIPAL('UserID') AUTHADD(DSP)
Note: The change permission (+chgin setmqaut andCHGin MQSC) on queue object is needed to retrieve queue reset statistics data. You can choose not to grant change permission if required, but the queue reset statistics data will not be displayed in queue dashboard. -
-
To ensure all the commands work, restart queue manager or refresh security:
echo "REFRESH SECURITY" | runmqsc QMGR
These permissions cover all the necessary access rights for IBM MQ sensors to query and gather monitoring data.
Additional permissions
Typically, read-only access is adequate for most monitoring data needs. However, for some of the following metrics, additional permissions are required. The permissions must be adjusted to accommodate these requirements based on your required monitoring metrics.
-
Queue reset statistics data:
To retrieve queue reset statistics data, queue objects require the
changeauthority (+chg). -
Statistics data from
SYSTEM.ADMIN.STATISTICS.QUEUEqueue:Access to statistics data from
SYSTEM.ADMIN.STATISTICS.QUEUEqueue requires thegetauthority (+get) because the statistics data is collected from this queue. -
IBM MQ events:
To obtain IBM MQ events, such as queue manager events, performance events, and channel events, grant
getauthority (+get) to theSYSTEM.ADMIN.PERFM.EVENT,SYSTEM.ADMIN.CHANNEL.EVENT, andSYSTEM.ADMIN.QMGR.EVENTsystem queues. -
IBM MQ monitoring data from the PCF interface:
The IBM MQ sensor calls the PCF interface to inquire data. The IBM MQ management mechanism uses the
putauthority (+put) forSYSTEM.ADMIN.COMMAND.QUEUEqueue to put thePCFcommand. To create a temporary queue based on the queue template and to save thePCFcommand, queue manager needsgetauthority to retrieve the queue template fromSYSTEM.DEFAULT.MODEL.QUEUEqueue.