view release on metacpan or search on metacpan
* fix: don't reschedule too early on a forced run at start
* fix: Don't use delaytime on config reload
* fix: use target counters reset to better support config reload
* feature: limit next run delay reduction
Limit next run random delay reduction to max 1/6 of the delay if less than 6 hours,
limit to max an hour for delay from 6 hours to 24 hours,
and limit to max 1/24 of the delay for delay greater than a day.
This would keep enough delay randomization to avoid mass agent server connection and
keep next seen run more coherent with the requested delay.
* fix service shutdown when HTTP client close the connection before the agent
* fix HTTP server keep-alive support with a 8 requests by connection maximum limit
* service update to support a safe forking system to firstly support handling
parallel http request for the Proxy HTTP server plugin.
* Proxy HTTP server plugin now support max_proxy_threads configuration which is
set to 10 maximum concurrent requests by default.
inventory:
* Bump Inventory task version to 1.9
* unix: fix last log user after a reboot
* added Samsung monitor serial support for models: B1940MR, B1940W, S22A450BW,
S22B420, S22E450, S22F350FHU, S27D390H, S27D850T, S27H850QFU, S19A450, SM943BM,
bin/fusioninventory-injector view on Meta::CPAN
my $tpp = XML::TreePP->new();
my $tree = $tpp->parse( $content );
$useragent = $tree->{REQUEST}->{CONTENT}->{VERSIONCLIENT}
if $tree && $tree->{REQUEST} && $tree->{REQUEST}->{CONTENT} &&
$tree->{REQUEST}->{CONTENT}->{VERSIONCLIENT};
}
my $ua = LWP::UserAgent->new(
agent => $useragent,
parse_head => 0, # No need to parse HTML
keep_alive => 1,
requests_redirectable => ['POST', 'GET', 'HEAD']
);
my $request = HTTP::Request->new( POST => $options->{url} );
my $info = "";
if ($options->{"no-ssl-check"}) {
my $url = $request->uri();
if ($url->scheme() eq 'https') {
if ($ua->can('ssl_opts')) {
$ua->ssl_opts(verify_hostname => 0, SSL_verify_mode => 0);
bin/fusioninventory-remoteinventory view on Meta::CPAN
pod2usage(
-message => "\nDirectory not found: $options->{directory}\n",
-verbose => 0,
-exitstatus => 1
) if ($options->{directory} && ! -d $options->{directory});
my $ua = LWP::UserAgent->new(
agent => $options->{useragent},
timeout => $options->{timeout} || 180,
parse_head => 0, # No need to parse HTML
keep_alive => 1,
);
if ($options->{ssl}) {
$ua->ssl_opts(SSL_ca_file => $options->{'ca-cert-file'})
if $options->{'ca-cert-file'};
$ua->ssl_opts(verify_hostname => 0, SSL_verify_mode => 0)
if $options->{ssl} && $options->{'no-ssl-check'};
}
$options->{verbose} = 1 if $options->{debug};
lib/FusionInventory/Agent/HTTP/Client.pm view on Meta::CPAN
ca_cert_file => $params{ca_cert_file}
};
bless $self, $class;
# create user agent
$self->{ua} = LWP::UserAgent->new(
requests_redirectable => ['POST', 'GET', 'HEAD'],
agent => $FusionInventory::Agent::AGENT_STRING,
timeout => $params{timeout} || 180,
parse_head => 0, # No need to parse HTML
keep_alive => 1,
);
if ($params{proxy}) {
$self->{ua}->proxy(['http', 'https'], $params{proxy});
} else {
$self->{ua}->env_proxy();
}
return $self;
}
lib/FusionInventory/Agent/HTTP/Server.pm view on Meta::CPAN
use Text::Template;
use File::Glob;
use URI;
use Socket qw(IN6ADDR_ANY inet_ntop);
use FusionInventory::Agent::Version;
use FusionInventory::Agent::Logger;
use FusionInventory::Agent::Tools;
use FusionInventory::Agent::Tools::Network;
# Limit maximum requests number handled in a keep-alive connection
use constant MaxKeepAlive => 8;
my $log_prefix = "[http server] ";
sub new {
my ($class, %params) = @_;
my $self = {
logger => $params{logger} ||
FusionInventory::Agent::Logger->new(),
lib/FusionInventory/Agent/HTTP/Server.pm view on Meta::CPAN
if (!$request) {
$client->close();
return;
}
my $path = $request->uri()->path();
my $method = $request->method();
$logger->debug($log_prefix . "$method request $path from client $clientIp");
my $keepalive = $request->header('connection') =~ /keep-alive/i;
my $status = 400;
my $error_400 = $log_prefix . "invalid request type: $method";
SWITCH: {
# root request
if ($path eq '/') {
last SWITCH if $method ne 'GET';
$status = $self->_handle_root($client, $request, $clientIp);
last SWITCH;
}
lib/FusionInventory/Agent/HTTP/Server.pm view on Meta::CPAN
$error_400 = $log_prefix . "unknown path: $path";
}
if ($status == 400) {
$logger->error($error_400) if $error_400;
$client->send_error(400)
}
$logger->debug($log_prefix . "response status $status") unless $status == 1;
if ($status == 200 && $keepalive && --$maxKeepAlive) {
# Looking for another request
$request = $client->get_request();
$self->_handle($client, $request, $clientIp, $maxKeepAlive) if $request;
}
$client->close();
}
sub _handle_plugins {
my ($self, $client, $request, $clientIp, $plugins, $maxKeepAlive) = @_;
my $logger = $self->{logger};
if (!$request) {
$client->close();
return;
}
my $path = $request->uri()->path();
my $method = $request->method();
my $keepalive = $request->header('connection') =~ /keep-alive/i;
$logger->debug($log_prefix . "$method request $path from client $clientIp via plugin");
my $status = 400;
my $match = 0;
foreach my $plugin (@{$plugins}) {
next if $plugin->disabled();
if ($plugin->urlMatch($path)) {
$match = 1;
last unless ($plugin->supported_method($method));
$status = $plugin->handle($client, $request, $clientIp);
lib/FusionInventory/Agent/HTTP/Server.pm view on Meta::CPAN
if ($status == 400) {
$logger->error($log_prefix . "unknown path: $path") unless $match;
$client->send_error(400);
$status = 400;
}
# Don't log status if we forked
$logger->debug($log_prefix . "response status $status") unless $status == 1;
if ($status == 200 && $keepalive && --$maxKeepAlive) {
# Looking for another request
$request = $client->get_request();
$self->_handle_plugins($client, $request, $clientIp, $plugins, $maxKeepAlive) if $request;
}
$client->close();
}
sub _handle_root {
my ($self, $client, $request, $clientIp) = @_;
lib/FusionInventory/Agent/HTTP/Server/Inventory.pm view on Meta::CPAN
if ($self->{request} eq 'session') {
my $nonce = $session->nonce();
unless ($nonce) {
$self->info("Session setup failure for $remoteid");
$client->send_error(500, 'Session failure');
return 500;
}
# Returned content is not useful but it should not be empty to support keep-alive
# This is a LWP::UserAgent limitation
my $response = HTTP::Response->new(
200,
'OK',
HTTP::Headers->new( 'X-Auth-Nonce' => $nonce, 'Content-Type' => 'Plain/Text' ),
"waiting inventory request..."
);
$client->send_response($response);
resources/macos/firewall/procinfo.txt view on Meta::CPAN
sockets = {
}
spawn type = daemon
cpumon = default
properties = {
partial import = 0
launchd bundle = 0
xpc bundle = 0
keepalive = 0
runatload = 0
dirty at shutdown = 0
low priority i/o = 0
low priority background i/o = 0
legacy timer behavior = 0
exception handler = 0
multiple instances = 0
supports transactions = 1
supports pressured exit = 0
enter kdp before kill = 0
resources/walks/sample4.walk view on Meta::CPAN
iso.3.6.1.2.1.16.9.1.1.2.3217 = ""
iso.3.6.1.2.1.16.9.1.1.2.3218 = ""
iso.3.6.1.2.1.16.9.1.1.2.3219 = ""
iso.3.6.1.2.1.16.9.1.1.2.3220 = ""
iso.3.6.1.2.1.16.9.1.1.2.3221 = ""
iso.3.6.1.2.1.16.9.1.1.2.3222 = ""
iso.3.6.1.2.1.16.9.1.1.2.3223 = ""
iso.3.6.1.2.1.16.9.1.1.2.3224 = ""
iso.3.6.1.2.1.16.9.1.1.2.3225 = STRING: "Switch-interconnect link is down"
iso.3.6.1.2.1.16.9.1.1.2.3226 = STRING: "Switch-interconnect link is up"
iso.3.6.1.2.1.16.9.1.1.2.3227 = STRING: "Peer keep-alive link not configured."
iso.3.6.1.2.1.16.9.1.1.2.3228 = STRING: "Peer keep-alive link is down."
iso.3.6.1.2.1.16.9.1.1.2.3229 = STRING: "Peer keep-alive send is successful."
iso.3.6.1.2.1.16.9.1.1.2.3230 = STRING: "Peer keep-alive send is failed."
iso.3.6.1.2.1.16.9.1.1.2.3231 = STRING: "Received keep-alive message from peer DT switch."
iso.3.6.1.2.1.16.9.1.1.2.3232 = STRING: "Switch role is Primary."
iso.3.6.1.2.1.16.9.1.1.2.3233 = STRING: "Switch role is Secondary, disabling all DT trunks."
iso.3.6.1.2.1.16.9.1.1.2.3234 = STRING: "Failed to receive keep-alive messages from peer DT switch."
iso.3.6.1.2.1.16.9.1.1.2.3235 = STRING: "Enabling all DT trunks."
iso.3.6.1.2.1.16.9.1.1.2.3236 = ""
iso.3.6.1.2.1.16.9.1.1.2.3237 = ""
iso.3.6.1.2.1.16.9.1.1.2.3238 = ""
iso.3.6.1.2.1.16.9.1.1.2.3239 = ""
iso.3.6.1.2.1.16.9.1.1.2.3240 = ""
iso.3.6.1.2.1.16.9.1.1.2.3241 = ""
iso.3.6.1.2.1.16.9.1.1.2.3242 = ""
iso.3.6.1.2.1.16.9.1.1.2.3243 = ""
iso.3.6.1.2.1.16.9.1.1.2.3244 = ""
resources/walks/sample4.walk view on Meta::CPAN
iso.3.6.1.4.1.11.2.14.11.5.1.64.1.1.1.1.2.87 = STRING: "security user-profile-mib "
iso.3.6.1.4.1.11.2.14.11.5.1.64.1.1.1.1.2.88 = STRING: "snmp "
iso.3.6.1.4.1.11.2.14.11.5.1.64.1.1.1.1.2.89 = STRING: "snmp pdu "
iso.3.6.1.4.1.11.2.14.11.5.1.64.1.1.1.1.2.90 = STRING: "snmp routines "
iso.3.6.1.4.1.11.2.14.11.5.1.64.1.1.1.1.2.91 = STRING: "snmp trap "
iso.3.6.1.4.1.11.2.14.11.5.1.64.1.1.1.1.2.92 = STRING: "vrrp "
iso.3.6.1.4.1.11.2.14.11.5.1.64.1.1.1.1.2.93 = STRING: "vrrp events "
iso.3.6.1.4.1.11.2.14.11.5.1.64.1.1.1.1.2.94 = STRING: "vrrp receive-packet "
iso.3.6.1.4.1.11.2.14.11.5.1.64.1.1.1.1.2.95 = STRING: "vrrp all-packet "
iso.3.6.1.4.1.11.2.14.11.5.1.64.1.1.1.1.2.96 = STRING: "distributed-trunking "
iso.3.6.1.4.1.11.2.14.11.5.1.64.1.1.1.1.2.97 = STRING: "distributed-trunking dt-keepalive "
iso.3.6.1.4.1.11.2.14.11.5.1.64.1.1.1.1.2.107 = STRING: "wireless-services "
iso.3.6.1.4.1.11.2.14.11.5.1.64.1.1.1.1.2.108 = STRING: "wireless-services a "
iso.3.6.1.4.1.11.2.14.11.5.1.64.1.1.1.1.2.109 = STRING: "wireless-services b "
iso.3.6.1.4.1.11.2.14.11.5.1.64.1.1.1.1.2.110 = STRING: "wireless-services c "
iso.3.6.1.4.1.11.2.14.11.5.1.64.1.1.1.1.2.111 = STRING: "wireless-services d "
iso.3.6.1.4.1.11.2.14.11.5.1.64.1.1.1.1.2.112 = STRING: "wireless-services e "
iso.3.6.1.4.1.11.2.14.11.5.1.64.1.1.1.1.2.113 = STRING: "wireless-services f "
iso.3.6.1.4.1.11.2.14.11.5.1.64.1.1.1.1.2.114 = STRING: "wireless-services g "
iso.3.6.1.4.1.11.2.14.11.5.1.64.1.1.1.1.2.115 = STRING: "wireless-services h "
iso.3.6.1.4.1.11.2.14.11.5.1.64.1.1.1.1.2.116 = STRING: "wireless-services i "