Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
docpublic:reseaux:services:monitcacti [2017/09/05 11:25]
procacci@tem-tsp.eu [supervision cacti]
docpublic:reseaux:services:monitcacti [2019/03/11 21:53] (current)
procacci@tem-tsp.eu [postfix template for cacti]
Line 333: Line 333:
 make[1] : on quitte le répertoire « /root/cacti-spine-0.8.8c » make[1] : on quitte le répertoire « /root/cacti-spine-0.8.8c »
 </code> </code>
 +
 +==== debug spine poller ====
 +
 +
 +  * https://github.com/Cacti/cacti/issues/284
 +  * https://www.carta.tech/man-pages/man1/spine.1.html
 +
 +<code>
 +/usr/local/spine/bin/spine -R -V 5 -f 1 -l 1 -S -p 4 -C /usr/local/spine/etc/spine.conf
 +</code>
 +
 +parfois un script a un pb de droit de fichier tmp dans /tmp apres debug en root , cela marche en shell root mais pas via spine / apache .
 +
 +<code>
 +[cacti@mon ~]$ /usr/share/cacti-1.1.20/scripts/tomcat_stats.pl 'tomcat.tsp.eu' 'tp' 'get' 'maxThreads' 'Catalina:type=ThreadPool,name="http-bio-8080"'
 +Could not open cache /tmp/tomcat.tsp.eu-cacti_tomcat-Q2F0YWxpbmE6dHlwZT1UaHJlYWRQb29sLG5hbWU9Kg== at /usr/share/cacti-1.1.20/scripts/tomcat_stats.pl line 338.
 +[cacti@mon ~]$ exit
 +déconnexion
 +[root@mon include]# ls -l /tmp/tomcat.tsp.eu-cacti_tomcat-Q2F0YWxpbmE6dHlwZT1UaHJlYW*
 +-rw-r--r-- 1 root root 2045 18 avril 21:18 /tmp/tomcat.tsp.eu-cacti_tomcat-Q2F0YWxpbmE6dHlwZT1UaHJlYWRQb29sLG5hbWU9Kg==
 +[root@monit include]# chown apache:cacti /tmp/tomcat.tsp.eu-cacti_tomcat-Q2F0YWxpbmE6dHlwZT1UaHJlYWRQb29sLG5hbWU9Kg\=\= 
 +</code>
 +
 +
 ===== cacti 8.8c ===== ===== cacti 8.8c =====
  
Line 422: Line 446:
 </code> </code>
  
 +
 +
 +===== postfix template for cacti =====
 +
 +
 +  * https://www.pitt-pladdy.com/blog/_20091122-164951_0000_Postfix_stats_on_Cacti_via_SNMP_/
 +  * https://www.pitt-pladdy.com/blog/_20120305-102839_0000_Cacti_hack_for_forward_compatibility/
 +
 +
 +recopies depuis smtpO vers smtpF
 +
 +<code>
 +[root@smtpO ~]# scp /etc/snmp/local-snmp-cronjob root@smtpF.imt-tsp.eu:/etc/snmp/
 +
 +
 +[root@smtpO ~]# scp -r /etc/snmp/postfix-script-stats root@smtpF.imt-tsp.eu:/etc/snmp/
 +spamd.pm                                                                                                        100% 2971     2.5MB/  00:00    
 +postfix-stats-local 
 +
 +         
 +[root@smtpO ~]# scp /etc/cron.d/local-snmp root@smtpF.imt-tsp.eu:/etc/cron.d/
 +local-snmp              
 +
 +[root@smtpO ~]# scp -r /etc/snmp/uloganalyser-plugin root@smtpF.imt-tsp.eu:/etc/snmp/
 +postfix.pm  
 +
 +[root@smtpO ~]# scp /etc/snmp/uloganalyser root@smtp4.imtbs-tsp.eu:/etc/snmp/
 +uloganalyser                                                                   
 +
 +</code>
 +
 +sur la destination 
 +
 +<code>
 +[root@smtpF ~]# mkdir /var/local/snmp
 +</code>
 +
 +puis apres 5-10 mn , le cron a joué son role et les stats pour cacti sont là : 
 +
 +<code>
 +[root@smtpF ~]# cat /var/local/snmp/mail
 +lastrun=1552322401
 +lastline=16519
 +lastposition=2213301
 +repeatline=Mar 11 17:39:54 smtp4 postfix/qmgr[31062]: 68980116F2E1: removed
 +lastinode=344479
 +postfix:local:sent=2
 +postfix:local:sent:mailbox=2
 +postfix:pickup=2
 +postfix:queue:active=0
 +postfix:queue:deferred=194
 +postfix:queue:hold=0
 +postfix:queue:incoming=0
 +postfix:queue:maildrop=0
 +postfix:smtp:bounced=460
 +postfix:smtp:connect=3150
 +postfix:smtp:connect:ipv4=2826
 +postfix:smtp:connect:ipv6=323
 +postfix:smtp:connrefused=100
 +postfix:smtp:deferred=766
 +postfix:smtp:deferred:brokenserver=503
 +postfix:smtp:deferred:dnserror=10
 +postfix:smtp:deferred:greylist=144
 +postfix:smtp:deferred:other=88
 +postfix:smtp:deferred:timeout=11
 +postfix:smtp:lostconnection=77
 +postfix:smtp:noroute=107
 +postfix:smtp:sent=1040
 +postfix:smtp:timeout=220
 +postfix:smtp:unreachable=261
 +postfix:smtp:warning=6
 +postfix:smtpd:QUEUED=1162
 +postfix:smtpd:connect=1137
 +postfix:smtpd:connect:ipv4=1137
 +</code>
 +
 +
 +ajouter les extend a snmpd.conf 
 +
 +<code>
 +##  #cacti 
 +##  #  #http://www.pitt-pladdy.com/blog/_20091122-164951_0000_Postfix_stats_on_Cacti_via_SNMP_/
 +#
 +extend postfixlocal     /etc/snmp/postfix-script-stats/postfix-stats-local
 +extend postfixlmtp      /etc/snmp/postfix-script-stats/postfix-stats-lmtp
 +extend postfixpickup /etc/snmp/postfix-script-stats/postfix-stats-pickup
 +extend postfixqueue /etc/snmp/postfix-script-stats/postfix-stats-queue
 +extend postfixsmtp      /etc/snmp/postfix-script-stats/postfix-stats-smtp-connect
 +extend postfixsmtpstatus        /etc/snmp/postfix-script-stats/postfix-stats-smtp-status
 +extend postfixsmtptls   /etc/snmp/postfix-script-stats/postfix-stats-smtp-tls
 +extend postfixsmtpwarn  /etc/snmp/postfix-script-stats/postfix-stats-smtp-warning
 +extend postfixsmtpd     /etc/snmp/postfix-script-stats/postfix-stats-smtpd-connect
 +extend postfixsmtpdnq   /etc/snmp/postfix-script-stats/postfix-stats-smtpd-noqueue
 +extend postfixsmtpdnqrec        /etc/snmp/postfix-script-stats/postfix-stats-smtpd-noqueue-recipient
 +extend postfixsmtpdnqrel        /etc/snmp/postfix-script-stats/postfix-stats-smtpd-noqueue-relay
 +extend postfixsmtpdnqsnd        /etc/snmp/postfix-script-stats/postfix-stats-smtpd-noqueue-sender
 +extend postfixsmtpdnqclnt       /etc/snmp/postfix-script-stats/postfix-stats-smtpd-noqueue-client
 +extend postfixsmtpdqd   /etc/snmp/postfix-script-stats/postfix-stats-smtpd-queued
 +extend postfixsmtpdtls  /etc/snmp/postfix-script-stats/postfix-stats-smtpd-tls
 +extend postfixsmtpdwarn /etc/snmp/postfix-script-stats/postfix-stats-smtpd-warning
 +extend postfixcleanup   /etc/snmp/postfix-script-stats/postfix-stats-cleanup
 +extend postfixpolicy /etc/snmp/postfix-script-stats/postfix-stats-policy
 +extend postfixip /etc/snmp/postfix-script-stats/postfix-stats-connect-ip
 +extend clamav /etc/snmp/postfix-script-stats/clamav-stats
 +extend dkim /etc/snmp/postfix-script-stats/dkim-stats
 +extend spamd /etc/snmp/postfix-script-stats/spamd-stats
 +</code>
docpublic/reseaux/services/monitcacti.1504610752.txt.gz · Last modified: 2017/09/05 11:25 by procacci@tem-tsp.eu
[unknown link type]Back to top
CC Attribution-Noncommercial-Share Alike 4.0 International
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0