pw slo


The pw slo commands enable you to create, edit, and delete SLOs. 
The following pw slo commands are available: 

  • pw slo add 
  • SLO edit commands: pw slo edit, pw slo add_monitor, pw slo edit_monitor, pw slo delete_monitor 
  • pw slo delete

To view help information, run the following command:
pw slo

Note

The pw slo commands can be run only by the following users:

  • The root user on UNIX or Linux, the administrator, or users belonging to the Administrators group on Microsoft Windows. 
  • Infrastructure Management users with SLO privileges.
     A user has SLO privileges if the user is an authenticated Infrastructure Management user associated with at least one user group that has at least one role with the permission enabled.

pw slo add

The pw slo add command is used to create an SLO.

The syntax for the command is as follows:

pw slo add SLOname [-owner SLOownerName] [-type SLOtypeName] -objective <objective> [-schedule
<scheduleName>] [-tcondition <thresholdCondition>] [-tvalue <thresholdValue>] [-tduration
<thresholdDuration>] -f <filter>
  • SLOname is the name of the SLO you are creating. 
  • SLOownerName is the name of the owner of the SLO. 
  • SLOtypeName is the type of SLO you are creating. If SLOtypeName not specified, the default SLO type, Availability, is applied. 
  • objective is the compliance objective for the SLO. 
  • scheduleName is the schedule that applies to the SLO. If no value is provided, the default value, 24x7, is applied. 
  • thresholdCondition is the threshold condition that is set for the SLO instances. Accepted values are <= to n or >= to n. If no value is provided, the default, >=, is applied. 
  • thresholdValue is the threshold value (numeric) set for the SLO instances. 
  • thresholdDuration is the number of minutes an SLO instance can breach the threshold condition before a violation is recorded. If no value is entered, the default value, 0 (zero), is applied. 
  • filter determines the monitor instances that are part of the SLO.
     The syntax for filteris as follows:

    [group|device=<groupName>|[<deviceName>|<deviceIPaddress>],mtype=<monitorTypeUniqueName>],mname=<monitorInstanceName>
    • groupName|deviceName|deviceIPaddress determines the monitor instances that are part of the SLO. These monitor instances can be part of a group or device. 
    • monitorTypeUniqueName is the unique name provided to each monitor type. 
    • monitorInstanceName is the name of the monitor instance.

      Filter examples:
      -f group=Action,mtype=WebURL,mname=Hotmail
       or
      -f device=192.168.1.82,mname=WebLogicInstance
       or
      -f device=192.168.1.82,mtype= Ping

      Note

      The threshold settings that you create are applied to all the monitor instances that match the SLO type and filters you provide. Ensure that the SLO type, filter, and threshold details you provide create a threshold setting that makes sense for the monitor instances that are part of the SLO.

      For example, for an Availability SLO type with only availability attributes, a threshold condition of >= and a threshold value of 100 is appropriate. However, those threshold details might not be appropriate if the SLO type provided contains some other attributes (for example, Response Time).

      Note

      To obtain the unique name of the desired monitor type (to be specified as filter), run the following CLI command:
      pw device help -mlist| more

    The pw slo add command uses the following assumptions:

  • If not specified in an argument, the default SLO type, Availability, is applied. 
  • The schedule name specified is already created or available in the system. 
  • All the monitor instances are given a weight of 1. 
  • Other SLO parameters are not mandatory for the current requirement.
    The pw slo add command has the following limitations:
  • SLOs created using this command can only contain monitor instances. 
  • You cannot use CLI commands to create nested SLOs. 
  • Financial impact is not captured by this command. 
  • You can only specify a single schedule. Multischedule support is not available.

    The following are usage examples for the pw slo add command:
  • # pw slo add slo1 -owner admin -objective 100 -f device=10.129.6.96
     #SLO 'slo1' created successfully. 
  • # pw slo add slo2 -type "Availability" -objective 100 -schedule 24x7 -f group=win_proc,mtype=WindowsProcess
     # SLO 'slo2' created successfully. 
  • # pw slo add slo3 -type "Response Time" -objective 98 -f device=10.128.112.105,mtype=WebURL,mname="http://10.128.112.105"
     #SLO 'slo3' created successfully.* 
  • # pw slo add slo4 -owner abc -objective 100 -f group=sys
     #SLO 'slo4' created successfully. 
  • # pw slo add test -type "Availability" -objective 95 -schedule "Business Hours" -tcondition ">=" -tvalue 100 -tduration 10 -f group=query,mtype=SybaseQuer
     #SLO 'test' created successfully.You can edit the following properties for an existing SLO by using the SLO edit commands:

SLO edit commands

  • Name 
  • Compliance level or objective 
  • Schedule 
  • Owner name 

The SLO edit command also perform the following task:

  • Add new monitor instances 
  • Delete existing monitor instances 
  • Update the threshold condition, duration, and valuThe syntax and parameters for the SLO edit commands are as follows:
  • Use the pw slo edit command to change the name, owner, objective, and schedule for an existing SLO. The pw slo editcommand has the following format:

    pw slo edit <slo_name> -type <slo_type> [-n
     <new_slo_name>][-owner <new_owner_name>][-objective
     <objective>][-schedule <schedule_name>]
  • Use the pw slo add_monitor command to add new monitor instances to an existing SLO. The pw slo add_monitorcommand has the following format:

    pw slo add_monitor <slo_name> -type <slo_type>
      [-tcondition <threshold_condition>][-tvalue
     <threshold_value>][-duration <threshold_duration>] -f
     <filter>
  • Use the pw slo edit_monitor command to change the threshold values for existing monitor instances of an SLO. The pw slo edit_monitorcommand has the following format:

    pw slo edit_monitor <slo_name> -type <slo_type>
      [-tcondition <threshold_condition>][-tvalue
     <threshold_value>][-tduration <threshold_duration> -f
     <filter>
  • Use the pw slo delete_monitor command to delete existing monitor instances of an SLO. The pw slo delete_monitorcommand has the following format:

    pw slo delete_monitor <slo_name> -type
     <slo_type> -f <filter>

    where

  • <slo_name> is the old SLO name. 
  • <slo_type> is the type of SLO. 
  • <new_slo_name> is the new (modified) SLO name. 
  • <new_owner_name> is the new SLO owner name. 
  • <objective> is the new objective. 
  • <schedule_name> is the schedule name. 
  • <threshold_condition> is the new threshold condition. 
  • <threshold_value> is the new threshold value. 
  • <threshold_duration> is the new threshold duration. 
  • <filter> determines the monitor instances that are part of the SLO.
    The syntax for filter is as follows:

    [group|device=<group_name>|<device_name or device_ip_address>,mtype=<monitor_type_unique_name],mname=<monitor_instance_name>

    where 

    • <group_name>|<device_name>|<device_ip> determines the monitor instances that are part of the SLO. These monitor instances can be part of a group or device. 
    • <monitor_type_unique_name> is the unique name provided to each monitor type. 
    • <monitor_instance_name> is the name of the monitor instance.
       For example, -f group=Action,mytpe=WebURL,mname=Hotmail
      or
      [-f device=192.68.1.82,mname=WebLogicInstance
      The pw slo edit, pw slo add_monitor, pw slo edit_monitor, and pw slo delete_monitor commands have the following limitations:
  • You cannot edit <slo_type>. 
  • You cannot modify the SLO schedule for inclusion and exclusion filter. 
  • To edit or add the monitor instances in the existing SLO, you must use either mname or mtype as part of the <filter> condition. 
  • The SLO must contain at least one monitor instance; therefore, you cannot delete all the monitor instances from an SLO. 
  • To edit a monitor, you must provide one of the following: -tcondition, -tvalue, or -tduration.
    The following are command usage examples for the SLO edit commands:
  • In this example, the pw slo edit command is used to edit the name, owner, objective and schedule of an existing SLO, test.
    # pw slo edit test -type Availability -n new_slo -owner new_owner -objective 100 -schedule "Business Hours"
     # You have selected test to edit
     # Successfully edited new_slo 
  • In this example, the pw slo edit_monitor command is used to edit the threshold values for an existing SLO, edit_monitor
  • # pw slo edit_monitor slo1 -type Availability -tcondition ">=" -tvalue 80 -tduration 15 -f device=10.128.112.105,mtype= SybaseQuery
     # Updating monitor instance....
     # Successfully updated monitor instances 
  • In this example, the pw slo add_monitor command is used to add new monitor instances to an existing SLO, slo_add.
    # pw slo add_monitor slo_add -type Availability -f device=10.128.112.105,mtype=WindowsProcess
     # Adding Monitor instances....
     # Successfully added monitor instances 
  • In this example, thepw slo delete_monitor command is used to delete monitor instances from an existing SLO, slo_test.
    # pw slo delete_monitor slo_test -type Availability -f device=10.128.112.105,mtype=WindowsProcess
     #Successfully deleted the Monitor InstancesThe pw slo delete command is used to delete an existing SLO or all of the SLOs in the system.

    The syntax and the parameters for the command are as follows:
    pw slo delete <slo_name>| ALL[-type <slo_type>][-force]
    where

pw slo delete

  • <slo_name> is the name of the SLO you want to delete. 
  • <slo_type> is the type of SLO you are deleting. If more than one SLO with the same name exists, you must provide <slo_type> to specify the unique type of the SLO to be deleted. 
  • ALL deletes all of the SLOs in the system. 
  • The -force option deletes the SLOs without asking a confirmation question before completing the deletion.
    The following are usage examples for the pw slo delete command:
  • # pw slo delete slo1
     # Are you sure you want to delete the SLO 'slo1' from the system (y/n)? y
     #SLO 'slo1' deleted successfully. 
  • # pw slo delete slo3 -force
     # SLO 'slo3' deleted successfully. 
  • # pw slo delete ALL
     # Are you sure you want to delete ALL the SLOs in the system (y/n)?y
     #All the SLOs got deleted successfully.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*