This is a dump of data that I found. Related to the Quick Action variables.
One for Services, one for Hosts. At the time I collected this information I think I found them all. This was built Dec 2016 on Nagios XI 5.4.2 or older.
I found it handy for me as an admin to have access to see these bits, so I made a quick action that only I can use. I am attaching a small perl file that displays the data for a specific host or service. I put the file here -> /usr/local/nagios/libexec/eventhandlers/readparams.pl and the quick actions are aimed there.
I created 2 quick actions, of for services, and one for hosts.
Defined here for:
Object Type: Host
Action Type: Command
Action Text: Debug Helper - Dump all Variables for Host
Custom permissions only for my user account - or any other admins...
URL / Command: In the code block below
Code: Select all
/usr/local/nagios/libexec/eventhandlers/readparams.pl -username "%username% " -objecttype "%objecttype% " -notesurl "%notesurl% " -actionurl "%actionurl% " -notes "%notes% " -hostname "%hostname% " -hostaddress "%hostaddress% " -hostid "%hostid% " -hostdisplayname "%hostdisplayname% " -hostalias "%hostalias% " -hoststateid "%hoststateid% " -hoststatetype "%hoststatetype% " -hoststatustext "%hoststatustext% " -hoststatustextlong "%hoststatustextlong% " -hostperfdata "%hostperfdata% " -hostchecktype "%hostchecktype% " -hostactivechecks "%hostactivechecks% " -hostpassivechecks "%hostpassivechecks% " -hostnotifications "%hostnotifications% " -hostacknowledged "%hostacknowledged% " -hosteventhandler "%hosteventhandler% " -hostflapdetection "%hostflapdetection% " -hostisflapping "%hostisflapping% " -hostpercentstatechange "%hostpercentstatechange% " -hostdowntime "%hostdowntime% " -hostlatency "%hostlatency% " -hostexectime "%hostexectime% " -hostlastcheck "%hostlastcheck% " -hostnextcheck "%hostnextcheck% " -hosthasbeenchecked "%hosthasbeenchecked% " -hostshouldbescheduled "%hostshouldbescheduled% " -hostcurrentattempt "%hostcurrentattempt% " -hostmaxattempts "%hostmaxattempts% " -hostgroupnames "%hostgroupnames% " -hostownerpoc "%_HOST_OWNER_POC% "
Defined here for:
Object Type: Service
Action Type: Command
Action Text: Debug Helper - Dump all Variables for Service
Custom permissions only for my user account - or any other admins...
URL / Command: In the code block
Code: Select all
/usr/local/nagios/libexec/eventhandlers/readparams.pl -username "%username% " -objecttype "%objecttype% " -notesurl "%notesurl% " -actionurl "%actionurl% " -notes "%notes% " -hostname "%hostname% " -hostaddress "%hostaddress% " -hostid "%hostid% " -hostdisplayname "%hostdisplayname% " -hostalias "%hostalias% " -hoststateid "%hoststateid% " -hoststatetype "%hoststatetype% " -hoststatustext "%hoststatustext% " -hoststatustextlong "%hoststatustextlong% " -hostperfdata "%hostperfdata% " -hostchecktype "%hostchecktype% " -hostactivechecks "%hostactivechecks% " -hostpassivechecks "%hostpassivechecks% " -hostnotifications "%hostnotifications% " -hostacknowledged "%hostacknowledged% " -hosteventhandler "%hosteventhandler% " -hostflapdetection "%hostflapdetection% " -hostisflapping "%hostisflapping% " -hostpercentstatechange "%hostpercentstatechange% " -hostdowntime "%hostdowntime% " -hostlatency "%hostlatency% " -hostexectime "%hostexectime% " -hostlastcheck "%hostlastcheck% " -hostnextcheck "%hostnextcheck% " -hosthasbeenchecked "%hosthasbeenchecked% " -hostshouldbescheduled "%hostshouldbescheduled% " -hostcurrentattempt "%hostcurrentattempt% " -hostmaxattempts "%hostmaxattempts% " -servicegroupnames "%servicegroupnames% " -serviceid "%serviceid% " -servicedisplayname "%servicedisplayname% " -servicestateid "%servicestateid% " -servicestatetype "%servicestatetype% " -servicestatustext "%servicestatustext% " -servicestatustextlong "%servicestatustextlong% " -serviceperfdata "%serviceperfdata% " -servicechecktype "%servicechecktype% " -serviceactivechecks "%serviceactivechecks% " -servicepassivechecks "%servicepassivechecks% " -servicenotifications "%servicenotifications% " -serviceacknowledged "%serviceacknowledged% " -serviceeventhandler "%serviceeventhandler% " -serviceflapdetection "%serviceflapdetection% " -serviceisflapping "%serviceisflapping% " -servicepercentstatechange "%servicepercentstatechange% " -servicedowntime "%servicedowntime% " -servicelatency "%servicelatency% " -serviceexectime "%serviceexectime% " -servicelastcheck "%servicelastcheck% " -servicenextcheck "%servicenextcheck% " -servicehasbeenchecked "%servicehasbeenchecked% " -serviceshouldbescheduled "%serviceshouldbescheduled% " -servicecurrentattempt "%servicecurrentattempt% " -servicemaxattempts "%servicemaxattempts% " -serviceownerpoc "%_SERVICE_OWNER_POC% "
The pl file is attached in a zip format.
Once you have the quick action defined, even if you do not use the pl file, you can run it and see information. The pl file just make it a column. Nothing special.
As a special bonus - look at the very last item in the code block - That OWNER item is actually a Free Variable defined in a template. Basically, that means you can create ANY parameter you need and send it to the Quick Actions. Once you know the proper syntax...
I'm a believer in the 'teach a man to fish' concept. Now that you know more, you will not go hungry.
I know you only asked for the username, but maybe this data overload will help others too.
Steve B