| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package App::Manoc; |
|
2
|
|
|
|
|
|
|
#ABSTRACT: Network monitoring application |
|
3
|
|
|
|
|
|
|
|
|
4
|
2
|
|
|
2
|
|
546391
|
use Moose; |
|
|
2
|
|
|
|
|
5
|
|
|
|
2
|
|
|
|
|
14
|
|
|
5
|
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = '2.99.2'; ##TRIAL VERSION |
|
7
|
|
|
|
|
|
|
|
|
8
|
2
|
|
|
2
|
|
15687
|
use namespace::autoclean; |
|
|
2
|
|
|
|
|
3400
|
|
|
|
2
|
|
|
|
|
1206
|
|
|
9
|
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
require 5.10.1; |
|
11
|
2
|
|
|
2
|
|
1256
|
use version 0.77; # even for Perl v.5.10.0 |
|
|
2
|
|
|
|
|
3391
|
|
|
|
2
|
|
|
|
|
17
|
|
|
12
|
|
|
|
|
|
|
|
|
13
|
2
|
|
|
2
|
|
906
|
use Catalyst::Runtime 5.90; |
|
|
2
|
|
|
|
|
278
|
|
|
|
2
|
|
|
|
|
51
|
|
|
14
|
|
|
|
|
|
|
|
|
15
|
2
|
|
|
2
|
|
704
|
use App::Manoc::DB; |
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
# Set flags and add plugins for the application |
|
18
|
|
|
|
|
|
|
# |
|
19
|
|
|
|
|
|
|
# -Debug: activates the debug mode for very useful log messages |
|
20
|
|
|
|
|
|
|
# ConfigLoader: will load the configuration from a Config::General file in the |
|
21
|
|
|
|
|
|
|
# application's home directory |
|
22
|
|
|
|
|
|
|
# Static::Simple: will serve static files from the application's root |
|
23
|
|
|
|
|
|
|
# directory |
|
24
|
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
use Catalyst qw/ |
|
26
|
|
|
|
|
|
|
ConfigLoader |
|
27
|
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
Static::Simple |
|
29
|
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
Authentication |
|
31
|
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
Session |
|
33
|
|
|
|
|
|
|
Session::Store::DBI |
|
34
|
|
|
|
|
|
|
Session::State::Cookie |
|
35
|
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
+App::Manoc::CatalystRole::RequestToken |
|
37
|
|
|
|
|
|
|
+App::Manoc::CatalystRole::Permission |
|
38
|
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
StackTrace |
|
40
|
|
|
|
|
|
|
/; |
|
41
|
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
extends 'Catalyst'; |
|
43
|
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
with 'App::Manoc::Logger::CatalystRole'; |
|
45
|
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
# Configure the application. |
|
47
|
|
|
|
|
|
|
# |
|
48
|
|
|
|
|
|
|
# Note that settings in manoc.conf (or other external |
|
49
|
|
|
|
|
|
|
# configuration file that you set up manually) take precedence |
|
50
|
|
|
|
|
|
|
# over this when using ConfigLoader. Thus configuration |
|
51
|
|
|
|
|
|
|
# details given here can function as a default configuration, |
|
52
|
|
|
|
|
|
|
# with an external configuration file acting as an override for |
|
53
|
|
|
|
|
|
|
# local deployment. |
|
54
|
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
__PACKAGE__->config( |
|
56
|
|
|
|
|
|
|
name => 'App::Manoc', |
|
57
|
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
# Views setup |
|
59
|
|
|
|
|
|
|
default_view => 'TT', |
|
60
|
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
use_request_uri_for_path => 1, |
|
62
|
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
'Model::ManocDB' => $App::Manoc::DB::DEFAULT_CONFIG, |
|
64
|
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
# Disable deprecated behavior needed by old applications |
|
66
|
|
|
|
|
|
|
disable_component_resolution_regex_fallback => 1, |
|
67
|
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
'Plugin::Authentication' => { |
|
69
|
|
|
|
|
|
|
default_realm => 'userdb', |
|
70
|
|
|
|
|
|
|
realms => { |
|
71
|
|
|
|
|
|
|
userdb => { |
|
72
|
|
|
|
|
|
|
credential => { |
|
73
|
|
|
|
|
|
|
class => 'Password', |
|
74
|
|
|
|
|
|
|
password_field => 'password', |
|
75
|
|
|
|
|
|
|
password_type => 'self_check', |
|
76
|
|
|
|
|
|
|
}, |
|
77
|
|
|
|
|
|
|
store => { |
|
78
|
|
|
|
|
|
|
class => 'DBIx::Class', |
|
79
|
|
|
|
|
|
|
user_model => 'ManocDB::User', |
|
80
|
|
|
|
|
|
|
role_column => 'roles', |
|
81
|
|
|
|
|
|
|
}, |
|
82
|
|
|
|
|
|
|
}, |
|
83
|
|
|
|
|
|
|
agent => { |
|
84
|
|
|
|
|
|
|
credential => { |
|
85
|
|
|
|
|
|
|
class => 'HTTP', |
|
86
|
|
|
|
|
|
|
type => 'basic', |
|
87
|
|
|
|
|
|
|
password_field => 'password', |
|
88
|
|
|
|
|
|
|
password_type => 'self_check', |
|
89
|
|
|
|
|
|
|
}, |
|
90
|
|
|
|
|
|
|
store => { |
|
91
|
|
|
|
|
|
|
class => 'DBIx::Class', |
|
92
|
|
|
|
|
|
|
user_model => 'ManocDB::User', |
|
93
|
|
|
|
|
|
|
role_column => 'roles', |
|
94
|
|
|
|
|
|
|
} |
|
95
|
|
|
|
|
|
|
}, |
|
96
|
|
|
|
|
|
|
}, |
|
97
|
|
|
|
|
|
|
}, |
|
98
|
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
#remove stale sessions from db |
|
100
|
|
|
|
|
|
|
'Plugin::Session' => { |
|
101
|
|
|
|
|
|
|
expires => 28800, |
|
102
|
|
|
|
|
|
|
dbi_dbh => 'ManocDB', |
|
103
|
|
|
|
|
|
|
dbi_table => 'sessions', |
|
104
|
|
|
|
|
|
|
dbi_id_field => 'id', |
|
105
|
|
|
|
|
|
|
dbi_data_field => 'session_data', |
|
106
|
|
|
|
|
|
|
dbi_expires_field => 'expires', |
|
107
|
|
|
|
|
|
|
} |
|
108
|
|
|
|
|
|
|
); |
|
109
|
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
# Start the application |
|
111
|
|
|
|
|
|
|
__PACKAGE__->setup(); |
|
112
|
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
no Moose; |
|
114
|
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable( replace_constructor => 1 ); |
|
116
|
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
1; |
|
118
|
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
__END__ |
|
120
|
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
=pod |
|
122
|
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
=head1 NAME |
|
124
|
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
App::Manoc - Network monitoring application |
|
126
|
|
|
|
|
|
|
|
|
127
|
|
|
|
|
|
|
=head1 VERSION |
|
128
|
|
|
|
|
|
|
|
|
129
|
|
|
|
|
|
|
version 2.99.2 |
|
130
|
|
|
|
|
|
|
|
|
131
|
|
|
|
|
|
|
=head1 SYNOPSIS |
|
132
|
|
|
|
|
|
|
|
|
133
|
|
|
|
|
|
|
script/manoc_server.pl |
|
134
|
|
|
|
|
|
|
|
|
135
|
|
|
|
|
|
|
=head1 DESCRIPTION |
|
136
|
|
|
|
|
|
|
|
|
137
|
|
|
|
|
|
|
Manoc is a web-based network monitoring/reporting platform designed for moderate to large networks. |
|
138
|
|
|
|
|
|
|
|
|
139
|
|
|
|
|
|
|
Manoc collects and displays: |
|
140
|
|
|
|
|
|
|
|
|
141
|
|
|
|
|
|
|
=over 4 |
|
142
|
|
|
|
|
|
|
|
|
143
|
|
|
|
|
|
|
=item |
|
144
|
|
|
|
|
|
|
|
|
145
|
|
|
|
|
|
|
Ports status and mac-address associations network devices via SNMP |
|
146
|
|
|
|
|
|
|
|
|
147
|
|
|
|
|
|
|
=item |
|
148
|
|
|
|
|
|
|
|
|
149
|
|
|
|
|
|
|
Ethernet/IP address pairings via a sniffer agenta |
|
150
|
|
|
|
|
|
|
|
|
151
|
|
|
|
|
|
|
=item |
|
152
|
|
|
|
|
|
|
|
|
153
|
|
|
|
|
|
|
DHCP leases/reservations using a lightweight agent for ISC DHCPD |
|
154
|
|
|
|
|
|
|
based servers |
|
155
|
|
|
|
|
|
|
|
|
156
|
|
|
|
|
|
|
=item |
|
157
|
|
|
|
|
|
|
|
|
158
|
|
|
|
|
|
|
users and computer logon in a Windows AD environment, using an |
|
159
|
|
|
|
|
|
|
agent for syslog-ng to trap snare generated syslog messages |
|
160
|
|
|
|
|
|
|
|
|
161
|
|
|
|
|
|
|
=back |
|
162
|
|
|
|
|
|
|
|
|
163
|
|
|
|
|
|
|
Data is stored using a SQL database like Postgres or MySQL using DBIx::Class . |
|
164
|
|
|
|
|
|
|
|
|
165
|
|
|
|
|
|
|
=for markdown [](https://travis-ci.org/ManocLabs/manoc) |
|
166
|
|
|
|
|
|
|
|
|
167
|
|
|
|
|
|
|
=head1 SEE ALSO |
|
168
|
|
|
|
|
|
|
|
|
169
|
|
|
|
|
|
|
L<Catalyst> L<SNMP::Info> L<Moose> |
|
170
|
|
|
|
|
|
|
|
|
171
|
|
|
|
|
|
|
=head1 AUTHORS |
|
172
|
|
|
|
|
|
|
|
|
173
|
|
|
|
|
|
|
=over 4 |
|
174
|
|
|
|
|
|
|
|
|
175
|
|
|
|
|
|
|
=item * |
|
176
|
|
|
|
|
|
|
|
|
177
|
|
|
|
|
|
|
Gabriele Mambrini <gmambro@cpan.org> |
|
178
|
|
|
|
|
|
|
|
|
179
|
|
|
|
|
|
|
=item * |
|
180
|
|
|
|
|
|
|
|
|
181
|
|
|
|
|
|
|
Enrico Liguori |
|
182
|
|
|
|
|
|
|
|
|
183
|
|
|
|
|
|
|
=back |
|
184
|
|
|
|
|
|
|
|
|
185
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
|
186
|
|
|
|
|
|
|
|
|
187
|
|
|
|
|
|
|
This software is copyright (c) 2017 by Gabriele Mambrini. |
|
188
|
|
|
|
|
|
|
|
|
189
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
|
190
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
|
191
|
|
|
|
|
|
|
|
|
192
|
|
|
|
|
|
|
=cut |