Ad Widget

Collapse

How do i collect UserParameter data?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • morgolis
    Member
    • Oct 2004
    • 33

    #1

    How do i collect UserParameter data?

    I am using this command: UserParameter=mailq,echo /var/spool/mail/* | wc -w to watch our Mail queue and it didn't barf when i started the zabbix_agentd daemon. Checked and i am seeing my 5 forked processes running. Question is, how do i collect the data from that to display it in a graph?
  • Alexei
    Founder, CEO
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Sep 2004
    • 5654

    #2
    Use mailq as an item's key. Nice graph will appear shortly
    Alexei Vladishev
    Creator of Zabbix, Product manager
    New York | Tokyo | Riga
    My Twitter

    Comment

    • morgolis
      Member
      • Oct 2004
      • 33

      #3
      Well i'm running zabbix_agentd for Solaris and i set the key up for Zabbix Agent for collection. Is this correct?

      What i'm seeing on the graph is nearly a straight line.
      Min: 7279 w/ Max: 7282

      Now this doesn't seem right to me as it should vary a great deal more than this. Should this be set as a Zabbix Trapper item key?

      *EDIT* Nope, definately NOT a Trapper item, was getting Null values returned
      Last edited by morgolis; 02-11-2004, 02:20.

      Comment

      • Cirrus
        Junior Member
        • Oct 2004
        • 5

        #4
        Maybe you should experiment with the "update interval" settings in the Items panel.
        Did you try this?

        I'm not that much into mail server management, but wouldn't it be more effective to use mailq command and then grep and count the first lines of every mail in the queue? (I'm using Postfix) This and the Update Interval set to a few seconds (10-15) would be something I would suggest.

        Cheers!

        Comment

        • morgolis
          Member
          • Oct 2004
          • 33

          #5
          Ok been playing w/ the time and same meal deal. Doesn't vary too much from my other post. Course since i changed servers, i can't even see the map.

          Comment

          • morgolis
            Member
            • Oct 2004
            • 33

            #6
            I'm getting this error in my zabbix_suckerd.log file regarding mailq

            008409:20041202:153945 Getting value of [mailq] from host [CA_Sun_Solaris] failed (ZBX_ERROR)
            008409:20041202:153945 The value is not stored in database.

            It appears that it's unable to retrieve the data from the Solaris mail server. Suggestions?

            Comment

            • elings
              Junior Member
              • Mar 2005
              • 16

              #7
              Good work with Zabbix Alexei, please keep it up !


              I have tried mailq as key on item, but i just get "Not supported by ZABBIX agent" so it doesn't work.
              Should it be other type then ZABBIX agent, or what is wrong ?
              I'm running 1.1alpha7

              Comment

              • Nate Bell
                Senior Member
                • Feb 2005
                • 141

                #8
                Make sure you have added a UserParameter line to the monitored machine's zabbix_agentd.conf file (at the very bottom). mailq isn't a built in Zabbix key, but one that was defined by the initial poster (see first message). Don't forget to restart the agent once you have changed it's config file.

                Nate

                Comment

                • elings
                  Junior Member
                  • Mar 2005
                  • 16

                  #9
                  OK, i didn't understand that. Now i just have permisson problems.The zabbix user can't run the mailq command... must be root or trusted user. I tried adding zabbix user to the trusted-user file in sendmail, but it didn't work either.

                  Thank you Nate !

                  Comment

                  • johnl
                    Junior Member
                    • Jan 2005
                    • 27

                    #10
                    best thing to do is create a cron job to run your script and then output the result to a file.tmp then mv this file to file.output and have zabbix monitor the file.ouput using a UserParamater of cat file.output.

                    i found out yesterday from Alexei that zabbix cant monitor the output file utilised by the cron job as the cron accessing this file temporarily sets the file to empty. see the post on "Ideas on how best to monitor Qmail stats" to get a better idea.

                    regards
                    john
                    .

                    Comment

                    • elings
                      Junior Member
                      • Mar 2005
                      • 16

                      #11
                      I have done so now, it works fine with only one problem.
                      In the error field on the mailq item, zabbix says "Not supported by ZABBIX agent"
                      But it still works...

                      Thanks for your help John !

                      Comment

                      • elings
                        Junior Member
                        • Mar 2005
                        • 16

                        #12
                        Originally posted by johnl
                        best thing to do is create a cron job to run your script and then output the result to a file.tmp then mv this file to file.output and have zabbix monitor the file.ouput using a UserParamater of cat file.output.

                        i found out yesterday from Alexei that zabbix cant monitor the output file utilised by the cron job as the cron accessing this file temporarily sets the file to empty. see the post on "Ideas on how best to monitor Qmail stats" to get a better idea.

                        regards
                        john
                        .
                        I have done so now, it works fine with only one problem.
                        In the error field on the mailq item, zabbix says "Not supported by ZABBIX agent"
                        But it still works...

                        Thanks for your help John !

                        Comment

                        Working...