AnsweredAssumed Answered

Host Group Mode all setup in an include.

Question asked by TimothyYanosko604352 on Oct 17, 2016
Latest reply on Nov 18, 2016 by TimothyYanosko604352
Hi,
  We're beginning to implement host groups and don't want to hardcode the host in the Attributes tab.

  We've successfully implmented this code via an include preprocess statement when the agentgroup mode is FIRST.

:SET &HND# = PREP_PROCESS_AGENTGROUP ("INV.HOST_GROUP.CRIMS",,"BY_RULE")
:  PROCESS &HND#
:    SET &HOST# = GET_PROCESS_LINE(&HND#,1)
:    SET &STATUS# = GET_PROCESS_LINE(&HND#,2)
:    PRINT "Host: &HOST#"
:    PRINT "Status: &STATUS#"
:  IF &STATUS# = "Y"
:   TERM_PROCESS
:  ENDIF
:  ENDPROCESS
:CLOSE_PROCESS &HND#
:PUT_ATT HOST = &HOST#

But when the mode is ALL, the host assignement only occurs on the last server in the group.  Any help is apprecaited.

Outcomes