GenericAgent Custom Module
Moderator: crythias
-
- Znuny newbie
- Posts: 64
- Joined: 02 Sep 2015, 08:47
- Znuny Version: OTRS-Rel-5
GenericAgent Custom Module
I wan to understand How to use the Execute Custom Module of OTRS. I have written one custom module and use that module name in the text box and run for the ticket the output is not getting, below is the content of CustomModule.pm
package Kernel::System::GenericAgent::CustomModule;
use strict;
use warnings;
our @ObjectDependencies = (
'Kernel::System::Log',
);
sub new {
my ( $Type, %Param ) = @_;
# allocate new hash for object
my $Self = {};
bless( $Self, $Type );
# 0=off; 1=on;
$Self->{Debug} = $Param{Debug} || 0;
return $Self;
}
sub Run {
my ( $Self, %Param ) = @_;
$Kernel::OM->Get('Kernel::System::Log')->Log(
Priority => 'notice',
Message =>
"test",
);
}
1;
Error getting while running the custom module is:-
Use module (CustomModule) for Ticket (2019040343000014/28892).
[Wed Apr 3 17:36:09 2019][Error][Kernel::System::GenericAgent::_JobRunTicket][1355] Module CustomModule.pm not in @INC (/drbd/otrs/bin/Custom /drbd/otrs/bin/Kernel/cpan-lib /drbd/otrs/bin /drbd/otrs/bin/cgi-bin/../../Custom /drbd/otrs/bin/cgi-bin/../../Kernel/cpan-lib /drbd/otrs/bin/cgi-bin/../.. /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .)
You do not have the required permissions to view the files attached to this post.
-
- Administrator
- Posts: 3963
- Joined: 18 Dec 2007, 12:23
- Znuny Version: Znuny and Znuny LTS
- Real Name: Roy Kaldung
- Company: Znuny
- Contact:
Re: GenericAgent Custom Module
Hi,
Try Kernel::System::GenericAgent::CustomModule for the module as the GenericAgent parameter.
- Roy
Try Kernel::System::GenericAgent::CustomModule for the module as the GenericAgent parameter.
- Roy
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO
Use a test system - always.
Do you need professional services? Check out https://www.znuny.com/
Do you want to contribute or want to know where it goes ?
Use a test system - always.
Do you need professional services? Check out https://www.znuny.com/
Do you want to contribute or want to know where it goes ?
-
- Znuny newbie
- Posts: 64
- Joined: 02 Sep 2015, 08:47
- Znuny Version: OTRS-Rel-5
Re: GenericAgent Custom Module
Great thanks it is working and printing the relevant in log file
[Wed Apr 3 17:51:16 2019][Notice][Kernel::System::GenericAgent::_JobRunTicket] Use module (Kernel::System::GenericAgent::CustomModule) for Ticket (2019040343000014/28892).
[Wed Apr 3 17:51:16 2019][Notice][Kernel::System::GenericAgent::CustomModule::Run] Increase priority of
[Wed Apr 3 17:51:16 2019][Notice][Kernel::System::GenericAgent::_JobRunTicket] Use module (Kernel::System::GenericAgent::CustomModule) for Ticket (2019040343000014/28892).
[Wed Apr 3 17:51:16 2019][Notice][Kernel::System::GenericAgent::CustomModule::Run] Increase priority of