-
-
Save dvopsway/6d0bb8f23d9a9dc28d88 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // Lives at html/pages/device/graphs/asa-sessions.inc.php | |
| if ($device['os'] == "asa" || $device['os_group'] == "firewall") | |
| { | |
| $graph_title = "Firewall Sessions"; | |
| $graph_type = "asa_sessions"; | |
| include("includes/print-device-graph.php"); | |
| } | |
| ?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // Lives at includes/polling/os/asa.inc.php | |
| $sessrrd = $config['rrd_dir'] . "/" . $device['hostname'] . "/asa-sessions.rrd"; | |
| $sessions = snmp_get($device, "1.3.6.1.4.1.9.9.147.1.2.2.2.1.5.40.6", "-Ovq"); | |
| if (is_numeric($sessions)) | |
| { | |
| if (!is_file($sessrrd)) | |
| { | |
| rrdtool_create($sessrrd," DS:sessions:GAUGE:600:0:3000000 "); } | |
| rrdtool_update($sessrrd,"N:$sessions"); | |
| $graphs['asa_sessions'] = TRUE; | |
| } | |
| ?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // lives at html/includes/graphs/device/asa_sessions.inc.php | |
| $rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/" . safename("asa-sessions.rrd"); | |
| include("includes/graphs/common.inc.php"); | |
| $ds = "sessions"; | |
| $colour_area = "9999cc"; | |
| $colour_line = "0000cc"; | |
| $colour_area_max = "9999cc"; | |
| $graph_max = 1; | |
| $unit_text = "Sessions"; | |
| include("includes/graphs/generic_simplex.inc.php"); | |
| ?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //add to graphtypes.inc.php in includes/definitions | |
| $config['graph_types']['device']['asa_sessions']['section'] = 'firewall'; | |
| $config['graph_types']['device']['asa_sessions']['order'] = '0'; | |
| $config['graph_types']['device']['asa_sessions']['descr'] = 'Active Sessions'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## add to the bottom of the $os = "asa" block in includes/definitions/os.inc.php | |
| $config['graph_types']['device']['asa_sessions']['section'] = 'firewall'; | |
| $config['graph_types']['device']['asa_sessions']['order'] = '0'; | |
| $config['graph_types']['device']['asa_sessions']['descr'] = 'Active Sessions'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment