Answer the question
In order to leave comments, you need to log in
Zabbix-PC monitoring in AD + email notification?
There was a task in Zabbix
System version 2.2
Reports on the status of the system should be sent to the mail daily.
The report in the form of graphs should contain information about all the machines in AD.
Graphs that should be:
1. RAM usage (hourly chart) for the previous day
2. Free disk space (if there are several disks, then for each)
3. CPU load
4. RAM usage by the W3W process
I just recently started to master Zabbix , where to dig, can such information be pulled out via SNMP or is it necessary to install an agent on each client machine?
Answer the question
In order to leave comments, you need to log in
zabbiks can't seem to send reports
why 2.2 if the 3 is already out, let's
say the memory and the percentage of one process is only in the 3 and is cut by the agent.
well, you just make a screen with the necessary charts in zabbix and you can go in every day and see them
After a long search for a solution, I shoveled a lot of all sorts of docks and scripts on this topic, I found such a solution for myself
Firstly, I decided that the report should be generated in pdf, I think the correct practice of reports for text data is CSV, for PDF graphics
Secondly, everything for Linux and Windows systems, it is better to use the Zabbix agent than the SNMP protocol (there are a lot of manuals and you don’t need to look for the MIB)
Divided the execution into stages
1. Creating msi packages for Windows systems, someone has already worked hard and done everything for us www.suiviperf .com/zabbix/index.php , downloaded by ORCA - www.technipages.com/download-orca-msi-editor , and edited by msi to suit your needs
2. We go to AD and through GPO or GPMC, drop Computer configuration - Software Settings - Software installation
We are waiting for Zabbix agents to be installed when booting the PC
3. Configure Zabbix
First create a group of hosts - I have TEST
Name - Local
IP range - 192.168.1.1-254 (Local range, separated by commas if there are several)
Checks - ICMP ping, Zabbix agent "system.uname"
Device uniqueness criteria - ICMP ping
Name - AddLocal
Discovery rule = Local
Received value like Windows
Uptime /Downtime >= 3600
Discovery status = Up
Service type = Zabbix agent
Add host
Add to host groups: Test
Link to templates: Template OS Windows
Enable host
Now our hosts, when found on the network for more than an hour and with Windows OS, will fall into the TEST host group
Delete hosts that have been inactive for more than a day
Name - REMOVELocal
Discovery rule = LOcal
Uptime/Downtime >= 86400
Service type = ICMP ping
Remove host
Enable debugging settings for the user with whom we will connect in the script, I used my account with administrative rights by default, for the Zabbix administrators group - DEBUG MODE - Enabled
4. The script itself is
https ://cloud.mail.ru/public/4hGR/gBZNGVJp9
Copy it to the zabbix directory /usr/share/zabbix/zabbix-dynamic-pdf-report
Create the report directory here with full rights chmod 777
Edit the config.inc.php file
Go to the page and check if the script works 192.168.11/zabbix/ zabbix-dynamic-pdf-report
I am generating a report on the conditions of CPU load, IIS WP3W Memory usage, Memory usage, Disk space usage
They are written in the createpdf.functions.php file
5. We write a handler and send the report by mail, hang it in crontab, we generate a report for the TEST host group, look at its id and add it to the get request
File getcurl.pl
#!/usr/bin/perl
my $strcurl = `curl " 192.168.1.11/zabbix/zabbix-dynamic-pdf-report/crea.. . "`;
sendreport.pl file
#!/usr/bin/perl
my $sen= system(' echo "" | mail -s "Zabbix Report day" -a "/usr/share/zabbix/zabbix-dynamic-pdf-report/report/test_PC_in_AD.pdf [email protected]');
So far I have found two flaws, I'm trying to fix
1. Dynamic detected drive letters are not substituted, the same story with processes, so the entire set must be indicated in the array
2. The graph for disks, not a circular one, but a regular diagram
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question