Back to Geneos FAQ

How to force a snooze for a set period of time as a default

Problem Copied

I am aware of the various snooze options but I want to ensure that specific users can only snooze an item for a set period of time (like 15 hours)

Solution Copied

A custom command will need to be created.

Geneos - How to force a snooze for a set period of time as a default

<command name="For Set Time Period - 15 hours">
    <targets>
        <target>//*</target>
    </targets>
    <task>
        <commands>
            <commandRef>
                <internalCommand>
                    <name>/SNOOZE:time</name>
                </internalCommand>
                <stopOnError>true</stopOnError>
            </commandRef>
        </commands>
        <args>
            <arg>
                <targetArgs>
                    <targetArg>
                        <commandNumber>1</commandNumber>
                        <argNumber>4</argNumber>
                    </targetArg>
                </targetArgs>
                <userInput>
                    <description>Hours</description>
                    <options>
                        <option>
                            <label>15 Hours</label>
                            <value>15</value>
                        </option>
                    </options>
                </userInput>
            </arg>
            <arg>
                <targetArgs>
                    <targetArg>
                        <commandNumber>1</commandNumber>
                        <argNumber>5</argNumber>
                    </targetArg>
                </targetArgs>
                <static>3600</static>
            </arg>
        </args>
        <silent>true</silent>
    </task>
</command>

Typically when you run the command you should get a dialog box similar to the below

Geneos - How to force a snooze for a set period of time as a default

The Gateway Snooze-Data plugin will display details of the snooze

Geneos - How to force a snooze for a set period of time as a default

If you want to override snooze commands so specific users can only run the above command and no other commands a custom role needs to be created.

Example

Geneos - How to force a snooze for a set period of time as a default

<role name="Snooze Specific">
    <permissions>
        <permission>
            <command>
                <targets>
                    <target>/*</target>
                </targets>
                <names>
                    <name>For Set Time Period - 15 hours</name>
                </names>
                <access>execute</access>
            </command>
        </permission>
        <permission>
            <command>
                <targets>
                    <target>/*</target>
                </targets>
                <names>
                    <name>/SNOOZE:info</name>
                    <name>/SNOOZE:severity*</name>
                    <name>/SNOOZE:date*</name>
                    <name>/SNOOZE:time*</name>
                    <name>/SNOOZE:until*</name>
                    <name>/SNOOZE:unsnooze*</name>
                </names>
                <access>none</access>
            </command>
        </permission>
    </permissions>
    <roleProperties>
        <roleProperty>Snooze Specific</roleProperty>
    </roleProperties>
    <users>
        <user ref="test3"></user>
    </users>
</role>

So when you right click your target you should only see the command you have custom created as a right click option.

Geneos - How to force a snooze for a set period of time as a default

https://docs.itrsgroup.com/docs/geneos/current/processing/monitoring-and-alerts/geneos_commands_tr/index.html#Heading-snooze-commands

["Geneos"] ["Geneos > Gateway"] ["FAQ"]

Was this topic helpful?