Page 1 of 1

Incidents assiging to wrong group

Posted: Mon Apr 16, 2018 12:21 pm
by udaykumar
Hi Team,

Nagios auto incidents are getting assigned to wrong id.
we have integrated to snow and incidents are getting assigned on basis of hostgroups.

if ( grep( /^Unix$/, @hostgroups ) ) {
$incident->{'assignment_group'} = 'Unix';
} elsif ( grep( /^Storage$/, @hostgroups ) ) {
$incident->{'assignment_group'} = 'Storage';
} elsif ( grep( /^OpenVMS$/, @hostgroups ) ) {
$incident->{'assignment_group'} = 'Unix';
} elsif ( grep( /^DataDomain$/, @hostgroups ) ) {
$incident->{'assignment_group'} = 'Backup';
} elsif ( grep( /^Tape Library$/, @hostgroups ) ) {
$incident->{'assignment_group'} = 'Backup';
} elsif ( grep( /^Brocade$/, @hostgroups ) ) {
$incident->{'assignment_group'} = 'Storage';
} elsif ( grep( /^DELL TP4000$/, @hostgroups ) ) {
$incident->{'assignment_group'} = 'Backup';
} elsif ( grep( /^HP 3PAR$/, @hostgroups ) ) {
$incident->{'assignment_group'} = 'Storage';
} elsif ( grep( /^netscaler$/, @hostgroups ) ) {
$incident->{'assignment_group'} = 'NetScaler';
} else {
$incident->{'assignment_group'} = 'IMOC L1.5';
}
my $SN = ServiceNow->new($CONFIG);

The incidents are assigning to new group service desk which is not at all defined in script.

can you let s know where the issue might be . either nagios or some other log.
please let us know if u want me share any other details

Re: Incidents assiging to wrong group

Posted: Tue Apr 17, 2018 8:43 am
by scottwilkerson
This snippet of code isn't enough for us to know how your customization works.

Can you post the whole thing and if it isn't a component how it is being called from Nagios?