├── .gitignore ├── var ├── www │ ├── admin │ │ ├── images │ │ │ ├── favicon.ico │ │ │ ├── file.png │ │ │ ├── pattern.png │ │ │ ├── directory.png │ │ │ ├── sort_asc.png │ │ │ ├── sort_both.png │ │ │ └── sort_desc.png │ │ ├── files │ │ │ └── .gitignore │ │ ├── .gitignore │ │ ├── js │ │ │ ├── autoFill.bootstrap.min.js │ │ │ ├── php_file_tree_jquery.js │ │ │ ├── buttons.bootstrap.min.js │ │ │ ├── buttons.colVis.min.js │ │ │ ├── dataTables.bootstrap.min.js │ │ │ └── jquery.dropdown.js │ │ ├── fonts │ │ │ ├── DroidSans.eot │ │ │ ├── DroidSans.ttf │ │ │ ├── PirataOne.woff2 │ │ │ ├── glyphicons-halflings-regular.ttf │ │ │ ├── glyphicons-halflings-regular.woff │ │ │ └── glyphicons-halflings-regular.woff2 │ │ ├── header.php │ │ ├── refresh-inventory.php │ │ ├── updateRunner.php │ │ ├── offline-vminventory.html │ │ ├── export-import.php │ │ ├── template │ │ │ └── inventory.tmpl │ │ └── css │ │ │ └── sexigraf.css │ └── scripts │ │ ├── purgeWhisperFile.sh │ │ ├── removeAutopurgeCrontab.sh │ │ ├── removeViCrontab.sh │ │ ├── removeVbrCrontab.sh │ │ ├── removeVsanCrontab.sh │ │ ├── updateInventory.sh │ │ ├── automountCD.sh │ │ ├── forceAutopurge.sh │ │ ├── addAutopurgeCrontab.sh │ │ ├── addViCrontab.sh │ │ ├── addVbrCrontab.sh │ │ ├── addVsanCrontab.sh │ │ ├── exportSexiGrafBundle.sh │ │ └── importSexiGrafBundle.sh └── lib │ └── grafana │ └── dashboards │ ├── SexiGraf │ ├── SexiGraf_Web_Admin.json │ ├── Shell_In_A_Box.json │ ├── Netdata.json │ ├── SexiGraf_Apache_Scoreboard.json │ └── SexiGraf_Pull_Exec_Time.json │ ├── VMware_Inventory │ ├── VMware_VM_Inventory.json │ ├── VMware_vSAN_Inventory.json │ ├── VMware_VBR_Inventory.json │ ├── VMware_Snap_Inventory.json │ ├── VMware_ESX_Inventory.json │ └── VMware_Datastore_Inventory.json │ ├── Veeam │ ├── Veeam_Job_Result.json │ ├── Veeam_Job_Status.json │ ├── Veeam_Multi_SOBR_Usage.json │ ├── Veeam_Multi_Repository_Usage.json │ └── Veeam_Restore_Point.json │ ├── VMware_vCenter │ └── VMware_vCenter_Active_Sessions.json │ ├── VMware_Cluster │ ├── VMware_Multi_Cluster_vMotion.json │ ├── VMware_Multi_Cluster_vCPU_pCPU.json │ └── VMware_Multi_Cluster_Usage.json │ ├── Miscellaneous │ └── SMART.json │ ├── VMware_vSAN │ └── VMware_VSAN_Disk_Utilization.json │ └── VMware_Datastore │ └── VMware_Multi_Datastore_Usage_Gauge.json ├── etc ├── sexigraf_version ├── sudoers.d │ └── sexigraf ├── cron.d │ ├── GrafanaPngCleaner │ ├── xMotionGarbageCollector │ └── ViOfflineInventory ├── apache2 │ ├── ports.conf │ ├── ssl │ │ ├── sexigraf.crt │ │ └── sexigraf.key │ └── sites-available │ │ └── graphite.conf ├── logrotate.d │ └── sexigraf ├── telegraf │ ├── telegraf.d │ │ ├── input.apache.conf │ │ ├── output.graphite.conf │ │ └── input.ipmi.conf │ └── telegraf.conf └── grafana │ └── provisioning │ ├── dashboards │ ├── SexiGraf.yaml │ ├── VMware_VM.yaml │ ├── VMware_ESX.yaml │ ├── VMware_vSAN.yaml │ ├── Veeam.yaml │ ├── Windows_OS.yaml │ ├── VMware_Cluster.yaml │ ├── VMware_vCenter.yaml │ ├── VMware_Datastore.yaml │ └── VMware_Inventory.yaml │ ├── alerting │ ├── compact_message_notification_template.yaml │ └── vcenter_bad_events_alert_rule.yaml │ └── datasources │ └── local_graphite.yaml ├── opt ├── sexigraf │ ├── ViDsInventory.csv │ ├── ViEsxInventory.csv │ ├── VbrVmInventory.csv │ ├── VsanObjInventory.csv │ ├── ViSnapInventory.csv │ ├── ViVmInventory.csv │ ├── powershell.config.json │ ├── ViConnect.ps1 │ ├── VbrConnect.ps1 │ ├── WhisperAutoPurge.ps1 │ └── CredstoreAdmin.ps1 └── graphite │ └── conf │ ├── storage-aggregation.conf │ └── storage-schemas.conf ├── usr └── share │ └── grafana │ └── public │ └── img │ └── sexigraf-banner.png ├── LICENSE.md └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store -------------------------------------------------------------------------------- /var/www/admin/images/favicon.ico: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /var/www/admin/files/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | -------------------------------------------------------------------------------- /etc/sexigraf_version: -------------------------------------------------------------------------------- 1 | 0.99l "Overwatch Nexus" -------------------------------------------------------------------------------- /var/www/admin/.gitignore: -------------------------------------------------------------------------------- 1 | offline-vminventory.html 2 | -------------------------------------------------------------------------------- /etc/sudoers.d/sexigraf: -------------------------------------------------------------------------------- 1 | www-data ALL=(root) NOPASSWD:ALL 2 | %www-data ALL=(root) NOPASSWD:ALL 3 | -------------------------------------------------------------------------------- /opt/sexigraf/ViDsInventory.csv: -------------------------------------------------------------------------------- 1 | "vCenter","Datastore","Type","Capacity","FreeSpace","Usage","Url" -------------------------------------------------------------------------------- /etc/cron.d/GrafanaPngCleaner: -------------------------------------------------------------------------------- 1 | 37 1 * * * root rm -f /var/lib/grafana/png/*.png >/dev/null 2>&1 2 | -------------------------------------------------------------------------------- /opt/sexigraf/ViEsxInventory.csv: -------------------------------------------------------------------------------- 1 | "vCenter","ESX","Cluster","Version","Model","State","RAM","CPU","Cores" -------------------------------------------------------------------------------- /var/www/admin/js/autoFill.bootstrap.min.js: -------------------------------------------------------------------------------- 1 | $.fn.dataTable.AutoFill.classes.btn="btn btn-primary"; 2 | -------------------------------------------------------------------------------- /var/www/admin/images/file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sexibytes/sexigraf/HEAD/var/www/admin/images/file.png -------------------------------------------------------------------------------- /opt/sexigraf/VbrVmInventory.csv: -------------------------------------------------------------------------------- 1 | "VbrServer","JobName","vCenter","Cluster","VM","RestorePointsCount","LastRestorePoint" -------------------------------------------------------------------------------- /var/www/admin/images/pattern.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sexibytes/sexigraf/HEAD/var/www/admin/images/pattern.png -------------------------------------------------------------------------------- /var/www/admin/fonts/DroidSans.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sexibytes/sexigraf/HEAD/var/www/admin/fonts/DroidSans.eot -------------------------------------------------------------------------------- /var/www/admin/fonts/DroidSans.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sexibytes/sexigraf/HEAD/var/www/admin/fonts/DroidSans.ttf -------------------------------------------------------------------------------- /var/www/admin/images/directory.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sexibytes/sexigraf/HEAD/var/www/admin/images/directory.png -------------------------------------------------------------------------------- /var/www/admin/images/sort_asc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sexibytes/sexigraf/HEAD/var/www/admin/images/sort_asc.png -------------------------------------------------------------------------------- /var/www/admin/images/sort_both.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sexibytes/sexigraf/HEAD/var/www/admin/images/sort_both.png -------------------------------------------------------------------------------- /var/www/admin/images/sort_desc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sexibytes/sexigraf/HEAD/var/www/admin/images/sort_desc.png -------------------------------------------------------------------------------- /opt/sexigraf/VsanObjInventory.csv: -------------------------------------------------------------------------------- 1 | "vCenter","Cluster","Uuid","Vm","Description","Type","ComplianceStatus","SpbmProfile","Health" -------------------------------------------------------------------------------- /var/www/admin/fonts/PirataOne.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sexibytes/sexigraf/HEAD/var/www/admin/fonts/PirataOne.woff2 -------------------------------------------------------------------------------- /opt/sexigraf/ViSnapInventory.csv: -------------------------------------------------------------------------------- 1 | "vCenter","VM","Cluster","Allocated_GB","SnapChild","SnapSizeGB","NewestSnapTime","OldestSnapTime" -------------------------------------------------------------------------------- /opt/sexigraf/ViVmInventory.csv: -------------------------------------------------------------------------------- 1 | "vCenter","VM","ESX","Cluster","IP","PortGroup","CommittedGB","MAC","GuestId","vCPU","vRAM","vmxPath","Folder" -------------------------------------------------------------------------------- /usr/share/grafana/public/img/sexigraf-banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sexibytes/sexigraf/HEAD/usr/share/grafana/public/img/sexigraf-banner.png -------------------------------------------------------------------------------- /var/www/scripts/purgeWhisperFile.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | if [[ "$1" =~ ^\/mnt\/wfs\/whisper\/.*$|^\/tmp\/.*$ ]] 3 | then 4 | rm -rf "$1" 5 | fi 6 | -------------------------------------------------------------------------------- /var/www/scripts/removeAutopurgeCrontab.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | crontabFile="/etc/cron.d/graphite_autopurge" 3 | rm -f $crontabFile 4 | service cron reload 5 | -------------------------------------------------------------------------------- /var/www/scripts/removeViCrontab.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | crontabFile="/etc/cron.d/vi_$(sed s/\\./_/g <<<$1)" 3 | rm -f $crontabFile 4 | service cron reload 5 | -------------------------------------------------------------------------------- /var/www/admin/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sexibytes/sexigraf/HEAD/var/www/admin/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /var/www/scripts/removeVbrCrontab.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | crontabFile="/etc/cron.d/vbr_$(sed s/\\./_/g <<<$1)" 3 | rm -f $crontabFile 4 | service cron reload 5 | -------------------------------------------------------------------------------- /var/www/scripts/removeVsanCrontab.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | crontabFile="/etc/cron.d/vsan_$(sed s/\\./_/g <<<$1)" 3 | rm -f $crontabFile 4 | service cron reload 5 | -------------------------------------------------------------------------------- /etc/cron.d/xMotionGarbageCollector: -------------------------------------------------------------------------------- 1 | 37 1 * * * root /usr/bin/pwsh -NonInteractive -NoProfile -f /opt/sexigraf/xMotionGarbageCollector.ps1 >/dev/null 2>&1 2 | -------------------------------------------------------------------------------- /var/www/admin/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sexibytes/sexigraf/HEAD/var/www/admin/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /var/www/admin/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sexibytes/sexigraf/HEAD/var/www/admin/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /var/www/scripts/updateInventory.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | /usr/bin/pwsh -NonInteractive -NoProfile -f /opt/sexigraf/ViOfflineInventory.ps1 -credstore /mnt/wfs/inventory/vipscredentials.xml >/dev/null 2>&1 -------------------------------------------------------------------------------- /etc/cron.d/ViOfflineInventory: -------------------------------------------------------------------------------- 1 | 3 */1 * * * root /usr/bin/pwsh -NonInteractive -NoProfile -f /opt/sexigraf/ViOfflineInventory.ps1 -credstore /mnt/wfs/inventory/vipscredentials.xml >/dev/null 2>&1 2 | -------------------------------------------------------------------------------- /var/www/scripts/automountCD.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | blkid /dev/sr0 1>/dev/null 3 | MSTATUS=$? 4 | 5 | if [ $MSTATUS -eq 0 ]; then 6 | mkdir -p /media/cdrom 7 | mount -t iso9660 /dev/sr0 /media/cdrom 8 | fi 9 | -------------------------------------------------------------------------------- /var/www/scripts/forceAutopurge.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | if [ -z $1 ] 3 | then 4 | MTIME=120 5 | else 6 | MTIME=$1 7 | fi 8 | /usr/bin/pwsh -NonInteractive -NoProfile -f /opt/sexigraf/WhisperAutoPurge.ps1 -DaysOld $MTIME >/dev/null 2>&1 9 | -------------------------------------------------------------------------------- /opt/sexigraf/powershell.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "PowerShellPolicies": { 3 | "ScriptBlockLogging": { 4 | "EnableScriptBlockInvocationLogging": false, 5 | "EnableScriptBlockLogging": false 6 | } 7 | }, 8 | "LogLevel": "error" 9 | } -------------------------------------------------------------------------------- /var/www/scripts/addAutopurgeCrontab.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | crontabFile="/etc/cron.d/graphite_autopurge" 3 | if [ -z $1 ] 4 | then 5 | MTIME=120 6 | else 7 | MTIME=$1 8 | fi 9 | echo "37 13 * * * root /usr/bin/pwsh -NonInteractive -NoProfile -f /opt/sexigraf/WhisperAutoPurge.ps1 -DaysOld $MTIME >/dev/null 2>&1" >> $crontabFile 10 | service cron reload -------------------------------------------------------------------------------- /var/www/scripts/addViCrontab.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | sessionFile="/tmp/vmw_$(sed s/\\./_/g <<<$1).key" 3 | crontabFile="/etc/cron.d/vi_$(sed s/\\./_/g <<<$1)" 4 | echo "*/5 * * * * root /usr/bin/pwsh -NonInteractive -NoProfile -f /opt/sexigraf/ViPullStatistics.ps1 -credstore /mnt/wfs/inventory/vipscredentials.xml -server $1 -sessionfile $sessionFile >/dev/null 2>&1" >> $crontabFile 5 | service cron reload -------------------------------------------------------------------------------- /var/www/scripts/addVbrCrontab.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | sessionFile="/tmp/vbr_$(sed s/\\./_/g <<<$1).key" 3 | crontabFile="/etc/cron.d/vbr_$(sed s/\\./_/g <<<$1)" 4 | echo "*/5 * * * * root /usr/bin/pwsh -NonInteractive -NoProfile -f /opt/sexigraf/VbrPullStatistics.ps1 -credstore /mnt/wfs/inventory/vbrpscredentials.xml -server $1 -sessionfile $sessionFile >/dev/null 2>&1" >> $crontabFile 5 | service cron reload -------------------------------------------------------------------------------- /var/www/admin/js/php_file_tree_jquery.js: -------------------------------------------------------------------------------- 1 | $(document).ready( function() { 2 | 3 | // Hide all subfolders at startup 4 | $(".php-file-tree").find("UL").hide(); 5 | 6 | // Expand/collapse on click 7 | $(".pft-directory A").click( function() { 8 | $(this).parent().find("UL:first").slideToggle("medium"); 9 | if( $(this).parent().attr('className') == "pft-directory" ) return false; 10 | }); 11 | 12 | }); 13 | -------------------------------------------------------------------------------- /etc/apache2/ports.conf: -------------------------------------------------------------------------------- 1 | # If you just change the port or add more ports here, you will likely also 2 | # have to change the VirtualHost statement in 3 | # /etc/apache2/sites-enabled/000-default.conf 4 | 5 | Listen 80 6 | Listen 127.0.0.1:8080 7 | 8 | 9 | Listen 443 10 | 11 | 12 | 13 | Listen 443 14 | 15 | 16 | # vim: syntax=apache ts=4 sw=4 sts=4 sr noet 17 | -------------------------------------------------------------------------------- /var/www/admin/js/buttons.bootstrap.min.js: -------------------------------------------------------------------------------- 1 | (function(b,a){b.extend(!0,a.Buttons.defaults,{dom:{container:{className:"dt-buttons btn-group"},button:{className:"btn btn-default"},collection:{tag:"ul",className:"dt-button-collection dropdown-menu",button:{tag:"li",className:"dt-button"},buttonLiner:{tag:"a",className:""}}}});a.ext.buttons.collection.text=function(a){return a.i18n("buttons.collection",'Collection ')}})(jQuery,jQuery.fn.dataTable); 2 | -------------------------------------------------------------------------------- /var/www/scripts/addVsanCrontab.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # sessionFile="/tmp/vmw_$(sed s/\\./_/g <<<$1).key" 3 | crontabFile="/etc/cron.d/vsan_$(sed s/\\./_/g <<<$1)" 4 | # echo "* * * * * root /usr/bin/pwsh -NonInteractive -NoProfile -f /opt/sexigraf/VsanPullStatistics.ps1 -credstore /mnt/wfs/inventory/vipscredentials.xml -server $1 -sessionfile $sessionFile >/dev/null 2>&1" >> $crontabFile 5 | echo "# Virtual SAN has left the building" >> $crontabFile 6 | service cron reload -------------------------------------------------------------------------------- /etc/logrotate.d/sexigraf: -------------------------------------------------------------------------------- 1 | /var/log/sexigraf/*.log { 2 | hourly 3 | missingok 4 | rotate 24 5 | compress 6 | delaycompress 7 | notifempty 8 | create 600 www-data www-data 9 | } 10 | /var/log/sexigraf/carbon/carbon-cache-*/*.log { 11 | hourly 12 | missingok 13 | rotate 24 14 | compress 15 | delaycompress 16 | notifempty 17 | } 18 | /var/log/sexigraf/carbon/carbon-relay-*/*.log { 19 | hourly 20 | missingok 21 | rotate 24 22 | compress 23 | delaycompress 24 | notifempty 25 | } -------------------------------------------------------------------------------- /etc/telegraf/telegraf.d/input.apache.conf: -------------------------------------------------------------------------------- 1 | [[inputs.apache]] 2 | ## An array of URLs to gather from, must be directed at the machine 3 | ## readable version of the mod_status page including the auto query string. 4 | ## Default is "http://localhost/server-status?auto". 5 | urls = ["http://localhost:8080/server-status?auto"] 6 | 7 | ## Credentials for basic HTTP authentication. 8 | # username = "myuser" 9 | # password = "mypassword" 10 | 11 | ## Maximum time to receive response. 12 | # response_timeout = "5s" 13 | 14 | ## Optional TLS Config 15 | # tls_ca = "/etc/telegraf/ca.pem" 16 | # tls_cert = "/etc/telegraf/cert.pem" 17 | # tls_key = "/etc/telegraf/key.pem" 18 | ## Use TLS but skip chain & host verification 19 | # insecure_skip_verify = false -------------------------------------------------------------------------------- /etc/grafana/provisioning/dashboards/SexiGraf.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: 1 2 | 3 | providers: 4 | # an unique provider name 5 | - name: 'SexiGraf' 6 | # org id. will default to orgId 1 if not specified 7 | orgId: 1 8 | # name of the dashboard folder. Required 9 | folder: 'SexiGraf' 10 | # folder UID. will be automatically generated if not specified 11 | # CRC32 of name 12 | folderUid: '40fb8002' 13 | # provider type. Required 14 | type: file 15 | # disable dashboard deletion 16 | disableDeletion: false 17 | # enable dashboard editing 18 | editable: true 19 | # how often Grafana will scan for changed dashboards 20 | updateIntervalSeconds: 10 21 | # allow updating provisioned dashboards from the UI 22 | allowUiUpdates: false 23 | options: 24 | # path to dashboard files on disk. Required 25 | path: /var/lib/grafana/dashboards/SexiGraf 26 | -------------------------------------------------------------------------------- /etc/grafana/provisioning/dashboards/VMware_VM.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: 1 2 | 3 | providers: 4 | # an unique provider name 5 | - name: 'VMware_VM' 6 | # org id. will default to orgId 1 if not specified 7 | orgId: 1 8 | # name of the dashboard folder. Required 9 | folder: 'VMware VM' 10 | # folder UID. will be automatically generated if not specified 11 | # CRC32 of name 12 | folderUid: 'b530c7dd' 13 | # provider type. Required 14 | type: file 15 | # disable dashboard deletion 16 | disableDeletion: false 17 | # enable dashboard editing 18 | editable: true 19 | # how often Grafana will scan for changed dashboards 20 | updateIntervalSeconds: 10 21 | # allow updating provisioned dashboards from the UI 22 | allowUiUpdates: false 23 | options: 24 | # path to dashboard files on disk. Required 25 | path: /var/lib/grafana/dashboards/VMware_VM 26 | -------------------------------------------------------------------------------- /etc/grafana/provisioning/dashboards/VMware_ESX.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: 1 2 | 3 | providers: 4 | # an unique provider name 5 | - name: 'VMware_ESX' 6 | # org id. will default to orgId 1 if not specified 7 | orgId: 1 8 | # name of the dashboard folder. Required 9 | folder: 'VMware ESX' 10 | # folder UID. will be automatically generated if not specified 11 | # CRC32 of name 12 | folderUid: 'd0242268' 13 | # provider type. Required 14 | type: file 15 | # disable dashboard deletion 16 | disableDeletion: false 17 | # enable dashboard editing 18 | editable: true 19 | # how often Grafana will scan for changed dashboards 20 | updateIntervalSeconds: 10 21 | # allow updating provisioned dashboards from the UI 22 | allowUiUpdates: false 23 | options: 24 | # path to dashboard files on disk. Required 25 | path: /var/lib/grafana/dashboards/VMware_ESX 26 | -------------------------------------------------------------------------------- /etc/grafana/provisioning/dashboards/VMware_vSAN.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: 1 2 | 3 | providers: 4 | # an unique provider name 5 | - name: 'VMware_vSAN' 6 | # org id. will default to orgId 1 if not specified 7 | orgId: 1 8 | # name of the dashboard folder. Required 9 | folder: 'VMware vSAN' 10 | # folder UID. will be automatically generated if not specified 11 | # CRC32 of name 12 | folderUid: 'b8abfc24' 13 | # provider type. Required 14 | type: file 15 | # disable dashboard deletion 16 | disableDeletion: false 17 | # enable dashboard editing 18 | editable: true 19 | # how often Grafana will scan for changed dashboards 20 | updateIntervalSeconds: 10 21 | # allow updating provisioned dashboards from the UI 22 | allowUiUpdates: false 23 | options: 24 | # path to dashboard files on disk. Required 25 | path: /var/lib/grafana/dashboards/VMware_vSAN 26 | -------------------------------------------------------------------------------- /etc/grafana/provisioning/dashboards/Veeam.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: 1 2 | 3 | providers: 4 | # an unique provider name 5 | - name: 'Veeam' 6 | # org id. will default to orgId 1 if not specified 7 | orgId: 1 8 | # name of the dashboard folder. Required 9 | folder: 'Veeam Backup & Replication' 10 | # folder UID. will be automatically generated if not specified 11 | # CRC32 of name 12 | folderUid: '30fb6004' 13 | # provider type. Required 14 | type: file 15 | # disable dashboard deletion 16 | disableDeletion: false 17 | # enable dashboard editing 18 | editable: true 19 | # how often Grafana will scan for changed dashboards 20 | updateIntervalSeconds: 10 21 | # allow updating provisioned dashboards from the UI 22 | allowUiUpdates: false 23 | options: 24 | # path to dashboard files on disk. Required 25 | path: /var/lib/grafana/dashboards/Veeam 26 | -------------------------------------------------------------------------------- /etc/grafana/provisioning/dashboards/Windows_OS.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: 1 2 | 3 | providers: 4 | # an unique provider name 5 | - name: 'Miscellaneous' 6 | # org id. will default to orgId 1 if not specified 7 | orgId: 1 8 | # name of the dashboard folder. Required 9 | folder: 'Miscellaneous' 10 | # folder UID. will be automatically generated if not specified 11 | # CRC32 of name 12 | folderUid: 'd94278cb' 13 | # provider type. Required 14 | type: file 15 | # disable dashboard deletion 16 | disableDeletion: false 17 | # enable dashboard editing 18 | editable: true 19 | # how often Grafana will scan for changed dashboards 20 | updateIntervalSeconds: 10 21 | # allow updating provisioned dashboards from the UI 22 | allowUiUpdates: false 23 | options: 24 | # path to dashboard files on disk. Required 25 | path: /var/lib/grafana/dashboards/Miscellaneous 26 | -------------------------------------------------------------------------------- /etc/grafana/provisioning/dashboards/VMware_Cluster.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: 1 2 | 3 | providers: 4 | # an unique provider name 5 | - name: 'VMware_Cluster' 6 | # org id. will default to orgId 1 if not specified 7 | orgId: 1 8 | # name of the dashboard folder. Required 9 | folder: 'VMware Cluster' 10 | # folder UID. will be automatically generated if not specified 11 | # CRC32 of name 12 | folderUid: '21622e98' 13 | # provider type. Required 14 | type: file 15 | # disable dashboard deletion 16 | disableDeletion: false 17 | # enable dashboard editing 18 | editable: true 19 | # how often Grafana will scan for changed dashboards 20 | updateIntervalSeconds: 10 21 | # allow updating provisioned dashboards from the UI 22 | allowUiUpdates: false 23 | options: 24 | # path to dashboard files on disk. Required 25 | path: /var/lib/grafana/dashboards/VMware_Cluster 26 | -------------------------------------------------------------------------------- /etc/grafana/provisioning/dashboards/VMware_vCenter.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: 1 2 | 3 | providers: 4 | # an unique provider name 5 | - name: 'VMware_vCenter' 6 | # org id. will default to orgId 1 if not specified 7 | orgId: 1 8 | # name of the dashboard folder. Required 9 | folder: 'VMware vCenter' 10 | # folder UID. will be automatically generated if not specified 11 | # CRC32 of name 12 | folderUid: '461fdd1d' 13 | # provider type. Required 14 | type: file 15 | # disable dashboard deletion 16 | disableDeletion: false 17 | # enable dashboard editing 18 | editable: true 19 | # how often Grafana will scan for changed dashboards 20 | updateIntervalSeconds: 10 21 | # allow updating provisioned dashboards from the UI 22 | allowUiUpdates: false 23 | options: 24 | # path to dashboard files on disk. Required 25 | path: /var/lib/grafana/dashboards/VMware_vCenter 26 | -------------------------------------------------------------------------------- /etc/grafana/provisioning/dashboards/VMware_Datastore.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: 1 2 | 3 | providers: 4 | # an unique provider name 5 | - name: 'VMware_Datastore' 6 | # org id. will default to orgId 1 if not specified 7 | orgId: 1 8 | # name of the dashboard folder. Required 9 | folder: 'VMware Datastore' 10 | # folder UID. will be automatically generated if not specified 11 | # CRC32 of name 12 | folderUid: '09eab473' 13 | # provider type. Required 14 | type: file 15 | # disable dashboard deletion 16 | disableDeletion: false 17 | # enable dashboard editing 18 | editable: true 19 | # how often Grafana will scan for changed dashboards 20 | updateIntervalSeconds: 10 21 | # allow updating provisioned dashboards from the UI 22 | allowUiUpdates: false 23 | options: 24 | # path to dashboard files on disk. Required 25 | path: /var/lib/grafana/dashboards/VMware_Datastore 26 | -------------------------------------------------------------------------------- /etc/grafana/provisioning/dashboards/VMware_Inventory.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: 1 2 | 3 | providers: 4 | # an unique provider name 5 | - name: 'VMware_Inventory' 6 | # org id. will default to orgId 1 if not specified 7 | orgId: 1 8 | # name of the dashboard folder. Required 9 | folder: 'VMware Inventory' 10 | # folder UID. will be automatically generated if not specified 11 | # CRC32 of name 12 | folderUid: '21622e96' 13 | # provider type. Required 14 | type: file 15 | # disable dashboard deletion 16 | disableDeletion: false 17 | # enable dashboard editing 18 | editable: true 19 | # how often Grafana will scan for changed dashboards 20 | updateIntervalSeconds: 10 21 | # allow updating provisioned dashboards from the UI 22 | allowUiUpdates: false 23 | options: 24 | # path to dashboard files on disk. Required 25 | path: /var/lib/grafana/dashboards/VMware_Inventory 26 | -------------------------------------------------------------------------------- /etc/grafana/provisioning/alerting/compact_message_notification_template.yaml: -------------------------------------------------------------------------------- 1 | # config file version 2 | apiVersion: 1 3 | 4 | # List of templates to import or update 5 | templates: 6 | # organization ID, default = 1 7 | - orgId: 1 8 | # name of the template, must be unique 9 | name: compact.message 10 | # content of the template 11 | template: | 12 | {{- /* Telegram message to use: {{ template "compact.message" . }} */ -}} 13 | {{ define "__alerts_list" -}} 14 | {{ range . }} 15 | {{ if len .Annotations }} 16 | {{ range .Annotations.SortedPairs -}} 17 | - {{ .Name }}: {{ .Value }} 18 | {{ end -}} 19 | {{ end }} 20 | {{- end -}} {{- /* range */ -}} 21 | {{- end -}} {{- /* define __alerts_list */ -}} 22 | {{ define "compact.message" }} 23 | {{ if gt (len .Alerts.Firing) 0 }} 24 | {{- template "__alerts_list" .Alerts.Firing }}{{ end -}} 25 | {{- end -}} -------------------------------------------------------------------------------- /etc/telegraf/telegraf.d/output.graphite.conf: -------------------------------------------------------------------------------- 1 | # # Configuration for Graphite server to send metrics to 2 | [[outputs.graphite]] 3 | # ## TCP endpoint for your graphite instance. 4 | # ## If multiple endpoints are configured, output will be load balanced. 5 | # ## Only one of the endpoints will be written to with each iteration. 6 | servers = ["localhost:2003"] 7 | # ## Prefix metrics name 8 | prefix = "telegraf" 9 | # ## Graphite output template 10 | # ## see https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_OUTPUT.md 11 | # template = "host.tags.measurement.field" 12 | template = "ipmi* measurement.measurement.server.tags.field" 13 | # 14 | # ## Enable Graphite tags support 15 | # # graphite_tag_support = false 16 | # 17 | # ## timeout in seconds for the write connection to graphite 18 | # timeout = 2 19 | # 20 | # ## Optional TLS Config 21 | # # tls_ca = "/etc/telegraf/ca.pem" 22 | # # tls_cert = "/etc/telegraf/cert.pem" 23 | # # tls_key = "/etc/telegraf/key.pem" 24 | # ## Use TLS but skip chain & host verification 25 | # # insecure_skip_verify = false -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 sexibytes 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /var/lib/grafana/dashboards/SexiGraf/SexiGraf_Web_Admin.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "SexiGraf Web Admin", 3 | "uid": "a2c5845e", 4 | "originalTitle": "SexiGraf Web Admin", 5 | "tags": [ 6 | "admin", 7 | "VI", 8 | "vSAN" 9 | ], 10 | "style": "light", 11 | "timezone": "browser", 12 | "editable": false, 13 | "hideControls": true, 14 | "sharedCrosshair": false, 15 | "rows": [ 16 | { 17 | "collapse": false, 18 | "editable": false, 19 | "height": "1100px", 20 | "panels": [ 21 | { 22 | "content": "", 23 | "id": 1, 24 | "mode": "html", 25 | "span": 12, 26 | "style": {}, 27 | "title": " ", 28 | "transparent": true, 29 | "hideControls": true, 30 | "type": "text" 31 | } 32 | ] 33 | } 34 | ], 35 | "time": { 36 | "from": "now-1h", 37 | "to": "now" 38 | }, 39 | "timepicker": { 40 | "hidden": true 41 | }, 42 | "templating": { 43 | "list": [] 44 | }, 45 | "annotations": { 46 | "list": [] 47 | }, 48 | "schemaVersion": 6, 49 | "version": 2, 50 | "links": [] 51 | } 52 | -------------------------------------------------------------------------------- /opt/sexigraf/ViConnect.ps1: -------------------------------------------------------------------------------- 1 | #!/usr/bin/pwsh -NonInteractive -NoProfile -Command 2 | # 3 | param([Parameter (Mandatory=$true)] [string] $server, [Parameter (Mandatory=$true)] [string] $username, [Parameter (Mandatory=$true)] [string] $password) 4 | 5 | # https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/PowerCLI-on-Debian-Stretch-The-type-initializer-for-VMware/m-p/451739#M10646 6 | Set-Content -Path Env:HOME -Value '/tmp' 7 | 8 | if (!$(Test-Connection -TargetName $server -TcpPort 443 -TimeoutSeconds 2)) { 9 | Write-Host "$server is not answering at TCP:443" 10 | exit 1 11 | } 12 | 13 | try { 14 | Import-Module VMware.Vim, VMware.VimAutomation.Cis.Core, VMware.VimAutomation.Common, VMware.VimAutomation.Core, VMware.VimAutomation.Sdk 15 | $PowerCliConfig = Set-PowerCLIConfiguration -ProxyPolicy NoProxy -DefaultVIServerMode Single -InvalidCertificateAction Ignore -ParticipateInCeip:$false -DisplayDeprecationWarnings:$false -Confirm:$false -Scope Session 16 | $ViConnect = Connect-VIServer -Force -Server $server -User $username -Password $password -ErrorAction Stop 17 | $SessionSecretName = "vmw_" + $server.Replace(".","_") + ".key" 18 | $ViConnect.SessionSecret | Out-File -FilePath /tmp/$SessionSecretName 19 | Write-Host "Connected to $server" 20 | } catch { 21 | Write-Host "$($Error[0])" 22 | exit 1 23 | } -------------------------------------------------------------------------------- /etc/telegraf/telegraf.d/input.ipmi.conf: -------------------------------------------------------------------------------- 1 | # # Read metrics from the bare metal servers via IPMI 2 | # [[inputs.ipmi_sensor]] 3 | # ## optionally specify the path to the ipmitool executable 4 | # # path = "/usr/bin/ipmitool" 5 | # ## 6 | # ## Setting 'use_sudo' to true will make use of sudo to run ipmitool. 7 | # ## Sudo must be configured to allow the telegraf user to run ipmitool 8 | # ## without a password. 9 | # # use_sudo = false 10 | # ## 11 | # ## optionally force session privilege level. Can be CALLBACK, USER, OPERATOR, ADMINISTRATOR 12 | # # privilege = "ADMINISTRATOR" 13 | # ## 14 | # ## optionally specify one or more servers via a url matching 15 | # ## [username[:password]@][protocol[(address)]] 16 | # ## e.g. 17 | # ## root:passwd@lan(127.0.0.1) 18 | # ## 19 | # ## if no servers are specified, local machine sensor stats will be queried 20 | # ## 21 | # # servers = ["USERID:PASSW0RD@lan(192.168.1.1)"] 22 | 23 | # servers = [ 24 | # "ADMIN:password@lan(ipmi.supermicro.com)", 25 | # "Administrator:password@lanplus(ilo.hpe.com)" 26 | # ] 27 | 28 | # ## Recommended: use metric 'interval' that is a multiple of 'timeout' to avoid 29 | # ## gaps or overlap in pulled data 30 | # interval = "300s" 31 | # 32 | # ## Timeout for the ipmitool command to complete 33 | # timeout = "20s" 34 | # 35 | # ## Schema Version: (Optional, defaults to version 1) 36 | # metric_version = 2 -------------------------------------------------------------------------------- /etc/apache2/ssl/sexigraf.crt: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIDxzCCAq+gAwIBAgIJAPX4sXSuGLKmMA0GCSqGSIb3DQEBCwUAMHoxCzAJBgNV 3 | BAYTAkZSMQ4wDAYDVQQIDAVQQVJJUzEOMAwGA1UEBwwFUEFSSVMxETAPBgNVBAoM 4 | CFNleGlHcmFmMRcwFQYDVQQDDA5zZXhpZ3JhZi5sb2NhbDEfMB0GCSqGSIb3DQEJ 5 | ARYQcGxvdEBzZXhpZ3JhZi5mcjAeFw0xODA3MjAxMTQzMjJaFw0yODA3MTcxMTQz 6 | MjJaMHoxCzAJBgNVBAYTAkZSMQ4wDAYDVQQIDAVQQVJJUzEOMAwGA1UEBwwFUEFS 7 | SVMxETAPBgNVBAoMCFNleGlHcmFmMRcwFQYDVQQDDA5zZXhpZ3JhZi5sb2NhbDEf 8 | MB0GCSqGSIb3DQEJARYQcGxvdEBzZXhpZ3JhZi5mcjCCASIwDQYJKoZIhvcNAQEB 9 | BQADggEPADCCAQoCggEBAM3gya4TGi7ZxgXybXkqO3TcjejAb9T00O8BuZAeXt+z 10 | 2UXeADdj4QEUvXPLABdi17gfBs6zJd2dZwcRq+YBEqSSaljpcQXiQJvbxMrDIEpH 11 | HqptpkZHNNBhic/VGBXRe2KKHUQCnGyqMBeiPZUdhwWQGFVGPiFHXiYZChrjAUTn 12 | vbXyamdhb1CLXwbCUc5PIlp+Gd6gVkPa7qII75AmhrxBsEVN3sqcXLVIRtMxUpw9 13 | k6OOmAJqg//lBvezACg4HYXJLLGaZSrzFRF1Hp41wnQ6iyih8z9dW6/fHx5LqKw2 14 | Ud/WMiON+zytjeh/2uoasT7ANaqBkdCNVKPbKv3BlH8CAwEAAaNQME4wHQYDVR0O 15 | BBYEFMyI81uNrVV4xfcvP9KUi66LALpbMB8GA1UdIwQYMBaAFMyI81uNrVV4xfcv 16 | P9KUi66LALpbMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAFxTQq6G 17 | uDViuI1AqlO6T4HnveOdYnzbjmHsPxgczEKGC0KjMjqMmbGxUblxbd+cUcifrXTw 18 | WCaPgidNSUN6vqdyGS8p7veZDlyzSQo4Z4PpU09R+xvWiKnoGi4/VJhM5e4DDxsH 19 | Fvr9cG7d3hIN1e0rl8gCGZKKJ7bj/h463CsDBQRGTsfe/vizzwGXYdXqqtximVRK 20 | bU27TyxZUqLO0fickkRnTXN4fjkn/RZydRYSyU5GQox/AQIWtPSEIl5PI1M03d8d 21 | BgHq2x3X7bgxoE1e1/6gYy03O5JmFCr6maevwGHc1l1E/yJzlESwawxYDhhuZPJV 22 | p+gPqjh+4EZ0A1o= 23 | -----END CERTIFICATE----- 24 | -------------------------------------------------------------------------------- /opt/graphite/conf/storage-aggregation.conf: -------------------------------------------------------------------------------- 1 | [ExEvent] 2 | pattern = ^vi.*\.vi\.exec\.ExEvent.* 3 | xFilesFactor = 0.0 4 | aggregationMethod = sum 5 | 6 | [Vmotion] 7 | pattern = .\.numVmotions. 8 | xFilesFactor = 0.0 9 | aggregationMethod = last 10 | 11 | [SVMotion] 12 | pattern = .\.numSVMotions. 13 | xFilesFactor = 0.0 14 | aggregationMethod = last 15 | 16 | [XVMotion] 17 | pattern = .\.numXVMotions. 18 | xFilesFactor = 0.0 19 | aggregationMethod = last 20 | 21 | [ProductVersion] 22 | pattern = ^vi.*\.vi\.version\.* 23 | xFilesFactor = 0.0 24 | aggregationMethod = last 25 | 26 | [droppedRx] 27 | pattern = .\.droppedRx. 28 | xFilesFactor = 0.0 29 | aggregationMethod = sum 30 | 31 | [droppedTx] 32 | pattern = .\.droppedTx. 33 | xFilesFactor = 0.0 34 | aggregationMethod = sum 35 | 36 | [errorsRx] 37 | pattern = .\.errorsRx. 38 | xFilesFactor = 0.0 39 | aggregationMethod = sum 40 | 41 | [errorsTx] 42 | pattern = .\.errorsTx. 43 | xFilesFactor = 0.0 44 | aggregationMethod = sum 45 | 46 | [PathState] 47 | pattern = .\.superstats\.PathState\.* 48 | xFilesFactor = 0.0 49 | aggregationMethod = last 50 | 51 | [overallStatus] 52 | pattern = .\.quickstats\.overallStatus\.* 53 | xFilesFactor = 0.0 54 | aggregationMethod = last 55 | 56 | [veeamObjectRestorePoints] 57 | pattern = ^veeam.*\.objectRestorePoints 58 | xFilesFactor = 0.0 59 | aggregationMethod = sum 60 | 61 | [veeamRestorePointsCount] 62 | pattern = ^veeam.*\.restorePointsCount 63 | xFilesFactor = 0.0 64 | aggregationMethod = last 65 | 66 | [veeamResult] 67 | pattern = ^veeam.*\.result 68 | xFilesFactor = 0.0 69 | aggregationMethod = last 70 | 71 | [veeamStatus] 72 | pattern = ^veeam.*\.status 73 | xFilesFactor = 0.0 74 | aggregationMethod = last 75 | -------------------------------------------------------------------------------- /etc/apache2/ssl/sexigraf.key: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDN4MmuExou2cYF 3 | 8m15Kjt03I3owG/U9NDvAbmQHl7fs9lF3gA3Y+EBFL1zywAXYte4HwbOsyXdnWcH 4 | EavmARKkkmpY6XEF4kCb28TKwyBKRx6qbaZGRzTQYYnP1RgV0Xtiih1EApxsqjAX 5 | oj2VHYcFkBhVRj4hR14mGQoa4wFE57218mpnYW9Qi18GwlHOTyJafhneoFZD2u6i 6 | CO+QJoa8QbBFTd7KnFy1SEbTMVKcPZOjjpgCaoP/5Qb3swAoOB2FySyxmmUq8xUR 7 | dR6eNcJ0OosoofM/XVuv3x8eS6isNlHf1jIjjfs8rY3of9rqGrE+wDWqgZHQjVSj 8 | 2yr9wZR/AgMBAAECggEAGI86P+PTecdM0iTLXmrlUNmGrD9Yl+Tkj7567nBRDQqd 9 | XrJPAEyP6Nsahpeu2RtXdIVvAHVqjPdb9QHsqbFzEeLNgPHII9WLs4wR+8YvMe0u 10 | AVK3RSb1a+5WzE41Y1TsDSNAvn45PtVGi2s1QXaWRtmbrYCFpN6ooo7WH8L4wclU 11 | jqUZm2/JzM6ecGrzgp3wO+S3fAsUAHM0UThlVCPyLPwEjAcGWS1SzJIVVAxUiyl+ 12 | uy7/tkWuDZfjDE8yCMBW+FWHRO+8TxZ42zDYnKcm6jSZDq2u0BDO2c9pcBTmg0rz 13 | GEbPe9syWkq+K5FtkfumECVO9jioGGmyg1dl+n/IoQKBgQDuOTEEiMo6k+UcSNh7 14 | s81vprpxgUtHNa/KRFRogycLzPm6PzjWJKsLdDZZLby0QHw0oAXf9Pl3i59oeGVZ 15 | RKNL6j7IeYKF9/FIVkQw65ta2Xhv4HSyLPGNkcReco1dVdEWAgBWLNnOKz/PraT1 16 | dXlKlFGifwxUfZN2mztneI3cGQKBgQDdPbMtqV3+KhHBGnh5xuTjK5Rk81nnUYSk 17 | QP9MjP0tfsNb/XOWwTJ7CkqlV1ZXxuVDWtdHCnLv7KTzj+4GgYfcZC9wYpAzlrj6 18 | D67OebM9Ua/9cTb2nkEkJqzR2IcAWGCzzcsgcbyu0f+jskGc2Ll/85rPTgyTig9R 19 | U88zYWMIVwKBgQDXGutJBd9dX3gMvzZDFMsW2z0VCsOXjEGsaWCycmLKhA6m/zlq 20 | G/gawpfklKkFNgkxV6GWZVTxfjC1m6kgHxs4jE6epSGXqJfFUqgGaGiCc0YN92ZI 21 | EM8YnxvqkJNXSQsgTTRSm/Mb9++Jrmj6f1XDYwQHr6LJlA6YlXjhaHjn2QKBgFOz 22 | Ngh+XPr9O35M32ti3dE7+YY/srGa242wsWVqqZX+sTYqKwLL0KdP+3GWGypWKwJS 23 | acOMpnMymi0zNJ/tfVLZ7ECeaWO7D/w61q1yyWbXcrd1j4+5y3c70oIJYvm0ddFQ 24 | eBqsLPAOrqJlnAEU1QkdRmJLauKehrED/g24OFk9AoGATueftedrWgaFT1cRW6ks 25 | Hr+ysm/6LEczJb3W+alq8hRcjYWfC2Ryrs+/nBXECswm+usl+uDnhzfchZAK1nYS 26 | i5FqRBIClPPxV4YUnw2Yt15mgUXV3ibTiIJcF0g6Vj/pz/dYvT6F655VKjnoHqIo 27 | /RRDdA0DIh52ZlBjxx2Y7go= 28 | -----END PRIVATE KEY----- 29 | -------------------------------------------------------------------------------- /opt/sexigraf/VbrConnect.ps1: -------------------------------------------------------------------------------- 1 | #!/usr/bin/pwsh -NonInteractive -NoProfile -Command 2 | # 3 | param([Parameter (Mandatory=$true)] [string] $server, [Parameter (Mandatory=$true)] [string] $username, [Parameter (Mandatory=$true)] [string] $password) 4 | 5 | # https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/PowerCLI-on-Debian-Stretch-The-type-initializer-for-VMware/m-p/451739#M10646 6 | Set-Content -Path Env:HOME -Value '/tmp' 7 | 8 | if (!$(Test-Connection -TargetName $server -TcpPort 9419 -TimeoutSeconds 2)) { 9 | Write-Host "$server is not answering at TCP:9419 check if VeeamBackupRESTSvc is running" 10 | exit 1 11 | } 12 | 13 | try { 14 | $VbrHeaders = @{"accept" = "application/json";"x-api-version" = "1.0-rev1"} 15 | $VbrBody = @{grant_type = "password";username = $username;password = $password;refresh_token = "";code = "";use_short_term_refresh = ""} 16 | $VbrConnect = Invoke-RestMethod -SkipHttpErrorCheck -SkipCertificateCheck -Method POST -Uri $("https://" + $server + ":9419/api/oauth2/token") -Headers $VbrHeaders -ContentType "application/x-www-form-urlencoded" -Body $VbrBody 17 | if ($VbrConnect.access_token) { 18 | $SessionSecretName = "vbr_" + $server.Replace(".","_") + ".key" 19 | $SessionRefresh = "vbr_" + $server.Replace(".","_") + ".dat" 20 | $VbrConnect.access_token | Out-File -FilePath /tmp/$SessionSecretName 21 | $VbrConnect.refresh_token | Out-File -FilePath /tmp/$SessionRefresh 22 | Write-Host "Connected to $server" 23 | } else { 24 | Write-Host "Connection to $server failed!" 25 | exit 1 26 | } 27 | } catch { 28 | # Invoke-RestMethod: Unable to read data from the transport connection: Connection reset by peer. 29 | # https://helpcenter.veeam.com/docs/backup/vbr_rest/tls_certificate.html 30 | Write-Host "$($Error[0])" 31 | exit 1 32 | } -------------------------------------------------------------------------------- /var/lib/grafana/dashboards/SexiGraf/Shell_In_A_Box.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "SexiShell", 3 | "uid": "518425d3", 4 | "originalTitle": "SexiShell", 5 | "tags": [ 6 | "ssh" 7 | ], 8 | "style": "light", 9 | "timezone": "browser", 10 | "editable": false, 11 | "hideControls": true, 12 | "sharedCrosshair": false, 13 | "rows": [ 14 | { 15 | "collapse": false, 16 | "editable": false, 17 | "height": "1100px", 18 | "panels": [ 19 | { 20 | "content": "", 21 | "id": 1, 22 | "mode": "html", 23 | "span": 12, 24 | "style": {}, 25 | "title": "", 26 | "transparent": true, 27 | "type": "text" 28 | } 29 | ], 30 | "title": "SexiShell" 31 | } 32 | ], 33 | "nav": [ 34 | { 35 | "collapse": false, 36 | "enable": false, 37 | "hidden": true, 38 | "notice": false, 39 | "now": true, 40 | "refresh_intervals": [ 41 | "5s", 42 | "10s", 43 | "30s", 44 | "1m", 45 | "5m", 46 | "15m", 47 | "30m", 48 | "1h", 49 | "2h", 50 | "1d" 51 | ], 52 | "status": "Stable", 53 | "time_options": [ 54 | "5m", 55 | "15m", 56 | "1h", 57 | "6h", 58 | "12h", 59 | "24h", 60 | "2d", 61 | "7d", 62 | "30d" 63 | ], 64 | "type": "timepicker" 65 | } 66 | ], 67 | "time": { 68 | "from": "now-1h", 69 | "to": "now" 70 | }, 71 | "templating": { 72 | "list": [] 73 | }, 74 | "annotations": { 75 | "list": [] 76 | }, 77 | "schemaVersion": 6, 78 | "version": 2, 79 | "links": [] 80 | } 81 | -------------------------------------------------------------------------------- /var/lib/grafana/dashboards/SexiGraf/Netdata.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Netdata", 3 | "uid": "518425c3", 4 | "originalTitle": "Netdata", 5 | "tags": [ 6 | "admin", 7 | "VI", 8 | "vSAN" 9 | ], 10 | "style": "light", 11 | "timezone": "browser", 12 | "editable": false, 13 | "hideControls": true, 14 | "sharedCrosshair": false, 15 | "rows": [ 16 | { 17 | "collapse": false, 18 | "editable": false, 19 | "height": "1100px", 20 | "panels": [ 21 | { 22 | "content": "", 23 | "id": 1, 24 | "mode": "html", 25 | "span": 12, 26 | "style": {}, 27 | "title": "", 28 | "transparent": true, 29 | "type": "text" 30 | } 31 | ], 32 | "title": "Netdata" 33 | } 34 | ], 35 | "nav": [ 36 | { 37 | "collapse": false, 38 | "enable": false, 39 | "hidden": true, 40 | "notice": false, 41 | "now": true, 42 | "refresh_intervals": [ 43 | "5s", 44 | "10s", 45 | "30s", 46 | "1m", 47 | "5m", 48 | "15m", 49 | "30m", 50 | "1h", 51 | "2h", 52 | "1d" 53 | ], 54 | "status": "Stable", 55 | "time_options": [ 56 | "5m", 57 | "15m", 58 | "1h", 59 | "6h", 60 | "12h", 61 | "24h", 62 | "2d", 63 | "7d", 64 | "30d" 65 | ], 66 | "type": "timepicker" 67 | } 68 | ], 69 | "time": { 70 | "from": "now-1h", 71 | "to": "now" 72 | }, 73 | "templating": { 74 | "list": [] 75 | }, 76 | "annotations": { 77 | "list": [] 78 | }, 79 | "schemaVersion": 6, 80 | "version": 2, 81 | "links": [] 82 | } 83 | -------------------------------------------------------------------------------- /etc/grafana/provisioning/datasources/local_graphite.yaml: -------------------------------------------------------------------------------- 1 | # # config file version 2 | apiVersion: 1 3 | 4 | # # list of datasources that should be deleted from the database 5 | #deleteDatasources: 6 | # - name: Graphite 7 | # orgId: 1 8 | 9 | # list of datasources to insert/update depending 10 | # on what's available in the database 11 | datasources: 12 | # name of the datasource. Required 13 | - name: local 14 | # datasource type. Required 15 | type: graphite 16 | # access mode. direct or proxy. Required 17 | access: proxy 18 | # org id. will default to orgId 1 if not specified 19 | orgId: 1 20 | # url 21 | url: http://localhost:8080 22 | # database password, if used 23 | # password: 24 | # database user, if used 25 | # user: 26 | # database name, if used 27 | # database: 28 | # enable/disable basic auth 29 | basicAuth: false 30 | # basic auth username 31 | # basicAuthUser: 32 | # basic auth password 33 | # basicAuthPassword: 34 | # enable/disable with credentials headers 35 | # withCredentials: 36 | # mark as default datasource. Max one per org 37 | isDefault: true 38 | # fields that will be converted to json and stored in json_data 39 | jsonData: 40 | graphiteVersion: "1.1" 41 | # tlsAuth: true 42 | # tlsAuthWithCACert: true 43 | # httpHeaderName1: "Authorization" 44 | # json object of data that will be encrypted. 45 | # secureJsonData: 46 | # tlsCACert: "..." 47 | # tlsClientCert: "..." 48 | # tlsClientKey: "..." 49 | # 50 | # httpHeaderValue1: "Bearer xf5yhfkpsnmgo" 51 | version: 1 52 | # allow users to edit datasources from the UI. 53 | editable: false 54 | uid: bc36594f-bcf4-47fc-913e-e418f0814ecd 55 | -------------------------------------------------------------------------------- /var/www/admin/js/buttons.colVis.min.js: -------------------------------------------------------------------------------- 1 | (function(f,g){f.extend(g.ext.buttons,{colvis:function(a,b){return{extend:"collection",text:function(a){return a.i18n("buttons.colvis","Column visibility")},className:"buttons-colvis",buttons:[{extend:"columnsToggle",columns:b.columns}]}},columnsToggle:function(a,b){return a.columns(b.columns).indexes().map(function(a){return{extend:"columnToggle",columns:a}}).toArray()},columnToggle:function(a,b){return{extend:"columnVisibility",columns:b.columns}},columnsVisibility:function(a,b){return a.columns(b.columns).indexes().map(function(a){return{extend:"columnVisibility", 2 | columns:a,visibility:b.visibility}}).toArray()},columnVisibility:{columns:null,text:function(a,b,c){return c._columnText(a,c.columns)},className:"buttons-columnVisibility",action:function(a,b,c,d){a=b.column(d.columns);a.visible(void 0!==d.visibility?d.visibility:!a.visible())},init:function(a,b,c){var d=this,e=a.column(c.columns);a.on("column-visibility.dt"+c.namespace,function(a,b,e,f){e===c.columns&&d.active(f)}).on("column-reorder.dt"+c.namespace,function(){var e=a.column(c.columns);b.text(c._columnText(a, 3 | c.columns));d.active(e.visible())});this.active(e.visible())},destroy:function(a,b,c){a.off("column-visibility.dt"+c.namespace).off("column-reorder.dt"+c.namespace)},_columnText:function(a,b){var c=a.column(b).index();return a.settings()[0].aoColumns[c].sTitle.replace(/\n/g," ").replace(/<.*?>/g,"").replace(/^\s+|\s+$/g,"")}},colvisRestore:{className:"buttons-colvisRestore",text:function(a){return a.i18n("buttons.colvisRestore","Restore visibility")},init:function(a,b,c){c._visOriginal=a.columns().indexes().map(function(b){return a.column(b).visible()}).toArray()}, 4 | action:function(a,b,c,d){b.columns().every(function(a){this.visible(d._visOriginal[a])})}},colvisGroup:{className:"buttons-colvisGroup",action:function(a,b,c,d){b.columns(d.show).visible(!0);b.columns(d.hide).visible(!1)},show:[],hide:[]}})})(jQuery,jQuery.fn.dataTable); 5 | -------------------------------------------------------------------------------- /var/www/admin/js/dataTables.bootstrap.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | DataTables Bootstrap 3 integration 3 | ©2011-2014 SpryMedia Ltd - datatables.net/license 4 | */ 5 | (function(l,q){var d=function(b,c){b.extend(!0,c.defaults,{dom:"<'row'<'col-sm-6'l><'col-sm-6'f>><'row'<'col-sm-12'tr>><'row'<'col-sm-5'i><'col-sm-7'p>>",renderer:"bootstrap"});b.extend(c.ext.classes,{sWrapper:"dataTables_wrapper form-inline dt-bootstrap",sFilterInput:"form-control input-sm",sLengthSelect:"form-control input-sm"});c.ext.renderer.pageButton.bootstrap=function(g,d,r,s,i,m){var t=new c.Api(g),u=g.oClasses,j=g.oLanguage.oPaginate,e,f,n=0,p=function(c,d){var k,h,o,a,l=function(a){a.preventDefault(); 6 | b(a.currentTarget).hasClass("disabled")||t.page(a.data.action).draw("page")};k=0;for(h=d.length;k",{"class":u.sPageButton+ 7 | " "+f,id:0===r&&"string"===typeof a?g.sTableId+"_"+a:null}).append(b("",{href:"#","aria-controls":g.sTableId,"data-dt-idx":n,tabindex:g.iTabIndex}).html(e)).appendTo(c),g.oApi._fnBindAction(o,{action:a},l),n++)}},h;try{h=b(d).find(q.activeElement).data("dt-idx")}catch(l){}p(b(d).empty().html('